Function at 0x40bbd0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x80
mov ebx, ecx
mov esi, dword [esp + 0x94]
movzx eax, word [ebx + 0x10]
cmp eax, 0xff
je 0x40c199
xor eax, eax
mov dword [esp + 0x6c], eax
mov ecx, ebx
call fcn.0040b8d4
test eax, eax
jne 0x40bc10
add esp, 0x80
pop ebx
pop ebp
pop esi
pop edi
ret 4
mov ecx, dword [esi + 4]
mov ebp, dword [ebx + 0x30]
mov eax, ecx
xor edx, edx
div ebp
sub ecx, edx
mov eax, dword [esi + 0xc]
mov dword [esi + 4], ecx
mov ebp, dword [ebx + 0x30]
lea edi, [ebp + eax]
xor edx, edx
mov ecx, dword [esi]
div ebp
neg edx
lea eax, [edi + edx - 1]
xor edx, edx
mov dword [esi + 0xc], eax
mov ebp, dword [ebx + 0x30]
mov eax, ecx
div ebp
sub ecx, edx
mov dword [esi], ecx
mov edi, dword [ebx + 0x30]
mov eax, dword [esi + 8]
lea ebp, [edi + eax]
xor edx, edx
div edi
neg edx
lea eax, [ebp + edx - 1]
lea ecx, [esp + 0x70]
mov dword [esi + 8], eax
call fcn.0040b8bc
mov ebp, dword [esi + 4]
mov ecx, dword [ebx + 0x30]
mov eax, ebp
mov dword [esp + 0x24], ecx
xor edx, edx
mov edi, dword [esi]
div ecx
xor edx, edx
mov dword [esp + 4], eax
mov eax, dword [esi + 0xc]
div ecx
xor edx, edx
mov dword [esp + 0x60], eax
mov eax, edi
div ecx
xor edx, edx
mov dword [esp + 0x64], eax
mov eax, dword [esi + 8]
movzx esi, byte [ebx + 0xc]
div ecx
imul edi, esi
mov edx, edi
mov dword [esp + 0x5c], eax
mov eax, dword [ebx + 4]
imul ebp, eax
mov dword [esp + 0x68], eax
sar edx, 2
shr edx, 0x1d
add ebp, dword [ebx + 0x50]
add edx, edi
sar edx, 3
add ebp, edx
mov edx, esi
imul edx, dword [esp + 0x64]
mov edi, edx
sar edi, 2
imul eax, dword [esp + 4]
shr edi, 0x1d
add edi, edx
add eax, dword [ebx + 0x34]
sar edi, 3
add eax, edi
movzx edx, byte [ebx + 0xf]
test edx, edx
mov edx, dword [esp + 0x5c]
je 0x40c07e
mov edi, esi
sar edi, 2
shr edi, 0x1d
add esi, edi
sar esi, 3
mov edi, dword [esp + 4]
mov ecx, dword [esp + 0x60]
cmp edi, ecx
jge 0x40c138
mov dword [esp + 0x78], edx
mov edi, dword [esp + 0x64]
mov dword [esp + 0x70], edi
sub edx, edi
lea edi, [esi - 6]
mov dword [esp + 0x7c], ecx
mov ecx, dword [esp + 4]
mov dword [esp + 0x74], ecx
lea ecx, [esi - 5]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x68]
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x60]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 4]
mov dword [esp], ebx
xor ebx, ebx
test edx, edx
jle 0x40c124
mov dword [esp + 8], ebp
mov esi, dword [esp + 0x18]
mov dword [esp + 4], eax
jmp 0x40bd6b
mov eax, dword [esp]
mov ecx, dword [eax + 0x30]
xor eax, eax
xor edx, edx
xor edi, edi
mov dword [esp + 0x28], edx
xor edx, edx
test ecx, ecx
mov dword [esp + 0x2c], edi
jbe 0x40bf2f
mov edi, esi
imul edi, ecx
imul edi, ebx
add edi, dword [esp + 8]
mov dword [esp + 0x34], edi
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], ecx
xor ebp, ebp
mov eax, dword [esp + 0x24]
test eax, eax
jbe 0x40bf16
mov eax, dword [esp]
movzx ebx, word [eax + 0x10]
movzx ecx, byte [eax + 0x16]
movzx edi, byte [eax + 0x17]
mov dword [esp + 0x68], edi
movzx edi, byte [eax + 0x18]
mov dword [esp + 0x64], edi
movzx edi, word [eax + 0x12]
movzx eax, word [eax + 0x14]
mov dword [esp + 0x60], edi
mov dword [esp + 0x5c], eax
mov eax, ebp
imul eax, esi
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x30], edx
xor ebx, ebx
xor edx, edx
test esi, esi
je 0x40bed5
cmp esi, 5
jb 0x40c153
mov ecx, dword [esp + 0x30]
mov edi, dword [esp]
imul ecx, dword [edi + 4]
add ecx, dword [esp + 0x34]
add ecx, eax
mov dword [esp + 0x4c], ecx
lea ecx, [edx + edx]
add ecx, ecx
add ecx, ecx
mov dword [esp + 0x50], ecx
lea ecx, [edx + edx]
add ecx, ecx
lea ecx, [ecx + ecx + 8]
mov edi, dword [esp + 0x50]
mov dword [esp + 0x54], ecx
lea ecx, [edx + edx]
add ecx, ecx
lea ecx, [ecx + ecx + 0x10]
mov esi, dword [esp + 0x54]
mov dword [esp + 0x58], ecx
lea ecx, [edx + edx]
add ecx, ecx
lea ecx, [ecx + ecx + 0x18]
mov dword [esp + 0x48], ecx
mov dword [esp + 0x44], eax
mov dword [esp + 0x38], ebp
mov ebp, dword [esp + 0x4c]
movzx eax, byte [ebp + edx]
mov ecx, edi
shl eax, cl
add ebx, eax
movzx eax, byte [ebp + edx + 1]
mov ecx, esi
add edi, 0x20
add esi, 0x20
shl eax, cl
add ebx, eax
movzx eax, byte [ebp + edx + 2]
mov ecx, dword [esp + 0x58]
shl eax, cl
add ebx, eax
movzx eax, byte [ebp + edx + 3]
mov ecx, dword [esp + 0x48]
add edx, 4
shl eax, cl
add ebx, eax
add ecx, 0x20
add dword [esp + 0x58], 0x20
mov eax, dword [esp + 0x10]
cmp edx, eax
mov dword [esp + 0x48], ecx
jbe 0x40be55
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x44]
mov ebp, dword [esp + 0x38]
lea ecx, [edx + edx]
add ecx, ecx
add ecx, ecx
mov dword [esp + 0x38], ebp
mov edi, dword [esp + 0x4c]
movzx ebp, byte [edi + edx]
inc edx
shl ebp, cl
add ebx, ebp
add ecx, 8
cmp edx, esi
jb 0x40bec1
mov ebp, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
mov edx, ebx
shr edx, cl
mov ecx, dword [esp + 0x68]
and edx, dword [esp + 0x3c]
mov edi, ebx
add eax, esi
add dword [esp + 0x20], edx
inc ebp
shr edi, cl
mov ecx, dword [esp + 0x64]
and edi, dword [esp + 0x60]
add dword [esp + 0x28], edi
shr ebx, cl
and ebx, dword [esp + 0x5c]
add dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x24]
cmp ebp, ebx
jb 0x40bde9
mov edx, dword [esp + 0x30]
inc edx
mov eax, dword [esp + 0x24]
cmp edx, eax
jb 0x40bd9f
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
imul ecx, ecx
xor edx, edx
div ecx
mov ebp, eax
mov eax, dword [esp + 0x28]
xor edx, edx
div ecx
mov edi, eax
mov eax, dword [esp + 0x2c]
xor edx, edx
div ecx
mov ecx, dword [esp + 0x6c]
test ecx, ecx
jne 0x40bf6d
mov edx, dword [esp]
movzx ecx, byte [edx + 0x16]
shl ebp, cl
movzx ecx, byte [edx + 0x17]
shl edi, cl
add ebp, edi
movzx ecx, byte [edx + 0x18]
shl eax, cl
add ebp, eax
jmp 0x40bf7a
push eax
push edi
push ebp
call fcn.0040c1d0
mov ebp, eax
add esp, 0xc
xor edi, edi
test esi, esi
je 0x40c068
cmp esi, 6
jb 0x40c145
mov edx, ebx
imul edx, esi
lea ecx, [edi + edi]
add edx, dword [esp + 0xc]
add ecx, ecx
add ecx, ecx
mov dword [esp + 0x68], ecx
lea ecx, [edi + edi]
add ecx, ecx
lea ecx, [ecx + ecx + 8]
mov dword [esp + 0x64], ecx
lea ecx, [edi + edi]
add ecx, ecx
lea ecx, [ecx + ecx + 0x10]
mov dword [esp + 0x60], ecx
lea ecx, [edi + edi]
add ecx, ecx
lea ecx, [ecx + ecx + 0x18]
mov dword [esp + 0x5c], ecx
lea ecx, [edi + edi]
add ecx, ecx
lea ecx, [ecx + ecx + 0x20]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x68]
mov ebx, dword [esp + 0x20]
mov eax, ebx
shr ebx, cl
mov ecx, dword [esp + 0x64]
mov byte [edx + edi], bl
mov ebp, dword [esp + 0x1c]
shr eax, cl
mov ecx, dword [esp + 0x60]
mov byte [edx + edi + 1], al
mov eax, dword [esp + 0x20]
shr eax, cl
mov ecx, dword [esp + 0x5c]
mov byte [edx + edi + 2], al
mov eax, dword [esp + 0x20]
shr eax, cl
mov ecx, dword [esp + 0x24]
mov byte [edx + edi + 3], al
mov eax, dword [esp + 0x20]
shr eax, cl
add ecx, 0x28
mov byte [edx + edi + 4], al
add edi, 5
add dword [esp + 0x68], 0x28
add dword [esp + 0x64], 0x28
add dword [esp + 0x60], 0x28
add dword [esp + 0x5c], 0x28
mov dword [esp + 0x24], ecx
cmp edi, ebp
jbe 0x40bfdd
mov esi, dword [esp + 0x18]
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x14]
lea ecx, [edi + edi]
add ecx, ecx
add ecx, ecx
mov eax, ebp
shr eax, cl
add ecx, 8
mov byte [edx + edi], al
inc edi
cmp edi, esi
jb 0x40c059
inc ebx
mov edx, dword [esp + 0x78]
sub edx, dword [esp + 0x70]
cmp ebx, edx
jl 0x40bd65
jmp 0x40c10f
mov edi, esi
sar edi, 2
shr edi, 0x1d
add esi, edi
sar esi, 3
mov edi, dword [esp + 4]
mov ecx, dword [esp + 0x60]
cmp edi, ecx
jge 0x40c138
mov dword [esp + 0x78], edx
mov edi, dword [esp + 0x64]
mov dword [esp + 0x70], edi
sub edx, edi
mov dword [esp + 0x7c], ecx
mov ecx, dword [esp + 4]
mov dword [esp + 0x74], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x60]
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x68]
xor edi, edi
test edx, edx
jle 0x40c17b
mov esi, edi
mov ebp, dword [esp + 0x18]
imul esi, dword [esp + 0x18]
add esi, eax
mov dword [esp + 0xc], eax
jmp 0x40c0e9
mov ecx, dword [ebx + 0x30]
imul ecx, ebp
imul ecx, edi
add ecx, dword [esp + 8]
push ebp
push ecx
push esi
call fcn.0046e6c0
add esp, 0xc
add esi, ebp
inc edi
mov edx, dword [esp + 0x78]
sub edx, dword [esp + 0x70]
cmp edi, edx
jl 0x40c0e6
jmp 0x40c16d
mov ebp, dword [esp + 8]
mov eax, dword [esp + 4]
mov ebx, dword [esp]
mov ecx, dword [ebx + 0x30]
mov edi, dword [esp + 0x7c]
mov esi, dword [ebx + 4]
mov ebx, ecx
imul ebx, esi
add ebp, ebx
add dword [esp + 0xc], esi
inc eax
cmp eax, edi
jl 0x40bd4d
add esp, 0x80
pop ebx
pop ebp
pop esi
pop edi
ret 4
mov edx, ebx
imul edx, esi
add edx, dword [esp + 0xc]
jmp 0x40c052
mov ecx, dword [esp + 0x30]
mov edi, dword [esp]
imul ecx, dword [edi + 4]
add ecx, dword [esp + 0x34]
add ecx, eax
mov dword [esp + 0x4c], ecx
jmp 0x40beb2
mov eax, dword [esp + 0xc]
mov ecx, dword [ebx + 0x30]
mov esi, dword [esp + 0x7c]
mov ebp, dword [ebx + 4]
mov edi, ecx
imul edi, ebp
add eax, ebp
add dword [esp + 8], edi
mov edi, dword [esp + 4]
inc edi
mov dword [esp + 4], edi
cmp edi, esi
jl 0x40c0c9
jmp 0x40c138
movzx eax, word [ebx + 0x14]
cmp eax, 0xff
jne 0x40bbf2
movzx eax, word [ebx + 0x12]
cmp eax, 0xff
jne 0x40bbf2
cmp dword [ebx + 0x5c], 0
je 0x40bbf2
mov eax, 1
mov dword [esp + 0x6c], eax
jmp 0x40bbf8