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

Disassembly:
sub esp, 0x54
push ebx
mov ebx, dword [esp + 0x6c]
push ebp
push esi
cmp ebx, 0x18
push edi
mov dword [esp + 0x60], 0
je 0x40b3c1
cmp ebx, 8
jne 0x40be21
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
cmp ecx, eax
jge 0x40be21
mov ecx, dword [esp + 0x80]
cmp eax, ecx
jle 0x40b3e9
mov dword [esp + 0x88], ecx
fild dword [esp + 0x7c]
fidiv dword [esp + 0x70]
fmul dword [0x43f3cc]
fadd dword [0x43f2e8]
call fcn.0040f4d8
fild dword [esp + 0x80]
mov dword [esp + 0x58], eax
fidiv dword [esp + 0x74]
fmul dword [0x43f3cc]
fadd dword [0x43f2e8]
call fcn.0040f4d8
mov edi, dword [esp + 0x70]
mov dword [esp + 0x48], eax
mov ebp, edi
mov esi, ebx
imul esi, dword [esp + 0x7c]
imul ebp, ebx
xor eax, eax
add ebp, 0x1f
mov dword [esp + 0x20], eax
mov dword [esp + 0x44], eax
mov eax, ebx
add esi, 0x1f
cdq
and edx, 7
push 1
shr ebp, 5
add eax, edx
mov dword [esp + 0x20], 0
shl ebp, 2
sar eax, 3
shr esi, 5
mov dword [esp + 0x40], eax
lea eax, [ebp + 6]
shl esi, 2
push eax
mov dword [esp + 0x40], 1
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x48], esi
call fcn.0040fbb3
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x40be21
lea eax, [esi + 6]
push 1
push eax
call fcn.0040fbb3
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40b4be
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040f94a
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
lea ebx, [edi*4]
push ebx
call fcn.0040fd70
push ebx
mov dword [esp + 0x2c], eax
call fcn.0040fd70
mov ebx, eax
lea eax, [edi*4]
push eax
mov dword [esp + 0x60], ebx
call fcn.0040fd70
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x30]
add esp, 0xc
test eax, eax
je 0x40bddb
test ebx, ebx
je 0x40bddb
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x40bddb
test edi, edi
jbe 0x40b537
mov edx, dword [esp + 0x24]
sub ecx, ebx
mov eax, ebx
sub edx, ebx
mov dword [ecx + eax], 0x800
mov dword [eax], 0x800
mov dword [edx + eax], 0x800
add eax, 4
dec edi
jne 0x40b51d
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x74]
cmp edx, eax
jne 0x40b550
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
jmp 0x40b5b7
lea eax, [ebp + 6]
push 1
push eax
call fcn.0040fbb3
xor edi, edi
add esp, 8
cmp eax, edi
mov dword [esp + 0x14], eax
jne 0x40b5af
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040f94a
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x14], edi
push edx
call fcn.0040f94a
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], edi
push eax
call fcn.0040f94a
push ebx
mov dword [esp + 0x34], edi
call fcn.0040f94a
mov ecx, dword [esp + 0x3c]
xor ebx, ebx
push ecx
mov dword [esp + 0x68], ebx
call fcn.0040f94a
add esp, 0x14
mov dword [esp + 0x2c], edi
mov dword [esp + 0x60], 1
mov ecx, dword [esp + 0x84]
test ecx, ecx
jg 0x40b5d6
mov eax, dword [esp + 0x88]
test eax, eax
jle 0x40b62e
cmp eax, dword [esp + 0x80]
jge 0x40b62e
imul esi, ecx
test ecx, ecx
mov dword [esp + 0x44], esi
jle 0x40b62e
mov esi, dword [esp + 0x8c]
mov eax, ebp
mov edx, dword [esp + 0x94]
imul eax, esi
test edx, edx
mov dword [esp + 0x38], edx
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], eax
jne 0x40b62e
sub eax, ebp
mov edi, dword [esp + 0x10]
cmp edx, eax
mov ecx, ebp
sbb edx, edx
and edx, eax
mov eax, dword [esp + 0x68]
lea esi, [edx + eax]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x48]
cmp ecx, eax
mov dword [esp + 0x94], edx
mov dword [esp + 0x30], 0x1000
mov dword [esp + 0x5c], ecx
jae 0x40bd8d
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x74]
cmp eax, ecx
jne 0x40b696
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x68]
mov edi, dword [esp + 0x10]
mov ecx, ebp
lea esi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
add eax, ebp
mov ecx, edx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x1c], eax
jmp 0x40b991
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x70]
cmp edx, 0x1000
jge 0x40b7ca
test eax, eax
je 0x40b6ee
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jge 0x40b6ea
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x68]
mov edi, dword [esp + 0x10]
mov ecx, ebp
lea esi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x94]
and ecx, 3
add eax, ebp
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x70]
mov dword [esp + 0x20], eax
inc dword [esp + 0x1c]
mov eax, dword [esp + 0x78]
cmp eax, 8
je 0x40b787
cmp eax, 0x18
jne 0x40b7a6
mov ecx, dword [esp + 0x10]
test edi, edi
jbe 0x40b7a6
mov esi, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
mov edx, dword [esp + 0x70]
sub esi, ebx
mov eax, ebx
sub edi, ebx
mov dword [esp + 0x84], edx
xor edx, edx
mov ebp, dword [eax + esi]
mov dl, byte [ecx]
add eax, 4
imul edx, dword [esp + 0x94]
add ebp, edx
inc ecx
xor edx, edx
mov dword [eax + esi - 4], ebp
mov dl, byte [ecx]
mov ebp, dword [eax - 4]
imul edx, dword [esp + 0x94]
add ebp, edx
inc ecx
xor edx, edx
mov dword [eax - 4], ebp
mov dl, byte [ecx]
mov ebp, edx
mov edx, dword [esp + 0x94]
imul ebp, edx
add dword [eax + edi - 4], ebp
mov ebp, dword [esp + 0x84]
inc ecx
dec ebp
mov dword [esp + 0x84], ebp
jne 0x40b729
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x70]
jmp 0x40b7a6
xor eax, eax
test edi, edi
jbe 0x40b7a6
mov esi, dword [esp + 0x10]
xor ecx, ecx
mov cl, byte [eax + esi]
mov esi, dword [ebx + eax*4]
imul ecx, edx
add esi, ecx
mov dword [ebx + eax*4], esi
inc eax
cmp eax, edi
jb 0x40b78d
mov ecx, dword [esp + 0x30]
mov eax, 1
sub ecx, edx
mov edx, dword [esp + 0x48]
cmp edx, ecx
mov dword [esp + 0x30], ecx
mov dword [esp + 0x94], edx
jl 0x40b6aa
jmp 0x40b7ce
test eax, eax
je 0x40b81b
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jge 0x40b80a
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x68]
mov edi, dword [esp + 0x10]
mov ecx, ebp
lea esi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x94]
and ecx, 3
add eax, ebp
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x70]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], 0
inc eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x78]
cmp eax, 8
je 0x40b92a
cmp eax, 0x18
jne 0x40b965
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
test eax, eax
jbe 0x40b965
mov eax, dword [esp + 0x2c]
mov ecx, ebx
sub eax, ebx
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x24]
sub eax, ebx
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0x50], eax
mov ebx, dword [esp + 0x30]
xor eax, eax
mov al, byte [ebp]
mov edx, dword [esp + 0x8c]
imul eax, ebx
mov edi, dword [ecx + edx]
xor edx, edx
mov dl, byte [ebp + 1]
add eax, edi
inc ebp
mov edi, edx
imul edi, ebx
mov edx, dword [ecx]
add edi, edx
inc ebp
xor edx, edx
mov dl, byte [ebp]
imul edx, ebx
mov ebx, dword [esp + 0x84]
shr eax, 0xc
add edx, dword [ecx + ebx]
inc ebp
cmp eax, 0xff
jbe 0x40b8b3
mov eax, 0xff
shr edi, 0xc
cmp edi, 0xff
mov dword [esp + 0x4c], edi
jbe 0x40b8c9
mov ebx, 0xff
jmp 0x40b8cd
mov bl, byte [esp + 0x4c]
shr edx, 0xc
cmp edx, 0xff
jbe 0x40b8dd
mov edx, 0xff
mov byte [esi], al
mov eax, dword [esp + 0x84]
inc esi
add ecx, 4
mov byte [esi], bl
inc esi
mov byte [esi], dl
mov edx, dword [esp + 0x8c]
mov dword [ecx + eax - 4], 0x800
mov eax, dword [esp + 0x50]
mov dword [ecx - 4], 0x800
mov dword [ecx + edx - 4], 0x800
inc esi
dec eax
mov dword [esp + 0x50], eax
jne 0x40b869
mov ebx, dword [esp + 0x54]
mov edx, dword [esp + 0x94]
jmp 0x40b965
xor ecx, ecx
test edi, edi
jbe 0x40b965
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
sub ebp, esi
xor eax, eax
mov al, byte [esi + ebp]
imul eax, dword [esp + 0x30]
add eax, dword [ebx + ecx*4]
shr eax, 0xc
cmp eax, 0xff
jbe 0x40b956
mov eax, 0xff
mov byte [esi], al
mov dword [ebx + ecx*4], 0x800
inc ecx
inc esi
cmp ecx, edi
jb 0x40b93a
sub edx, dword [esp + 0x30]
mov dword [esp + 0x94], edx
jne 0x40b985
mov eax, dword [esp + 0x48]
mov dword [esp + 0x38], 1
mov dword [esp + 0x94], eax
mov ebp, dword [esp + 0x34]
mov dword [esp + 0x30], 0x1000
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x7c]
cmp eax, ecx
jne 0x40b9c7
mov edx, dword [esp + 0x6c]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
mov esi, dword [esp + 0x14]
lea edi, [eax + edx]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, edx
add eax, ecx
jmp 0x40bd6a
mov edi, dword [esp + 0x70]
mov edx, 0x800
xor ecx, ecx
xor ebx, ebx
xor ebp, ebp
mov esi, 0x1000
test edi, edi
mov dword [esp + 0x84], edx
mov eax, edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x50], ecx
jbe 0x40bc08
mov edi, dword [esp + 0x58]
cmp edi, esi
mov dword [esp + 0x4c], edi
jl 0x40bb38
mov ebp, dword [esp + 0x8c]
test ebx, ebx
je 0x40ba31
mov eax, dword [esp + 0x3c]
mov edx, 0x800
add ebp, eax
mov dword [esp + 0x84], edx
mov dword [esp + 0x8c], ebp
mov eax, edx
cmp ebp, dword [esp + 0x40]
jae 0x40bbbd
cmp ecx, dword [esp + 0x34]
jge 0x40bbbd
mov edi, dword [esp + 0x78]
cmp edi, 8
je 0x40bae9
cmp edi, 0x18
jne 0x40bb11
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x8c]
lea ebp, [ebx + edi]
mov edi, dword [esp + 0x14]
xor ebx, ebx
mov bl, byte [ecx + edi]
imul ebx, esi
add edx, ebx
xor ebx, ebx
mov bl, byte [ecx + edi + 1]
imul ebx, esi
add eax, ebx
xor ebx, ebx
mov bl, byte [ecx + edi + 2]
mov edi, dword [esp + 0x84]
imul ebx, esi
shr edx, 0xc
add edi, ebx
cmp edx, 0xff
jbe 0x40baa4
mov edx, 0xff
shr eax, 0xc
cmp eax, 0xff
jbe 0x40bab3
mov eax, 0xff
shr edi, 0xc
cmp edi, 0xff
mov dword [esp + 0x84], edi
jbe 0x40bad0
mov dword [esp + 0x84], 0xff
mov bl, byte [esp + 0x84]
mov byte [ebp], dl
inc ebp
mov edi, ebp
mov dword [esp + 0x28], ebp
mov byte [ebp], al
mov byte [edi + 1], bl
jmp 0x40bb11
mov edi, dword [esp + 0x14]
xor ebx, ebx
mov bl, byte [ecx + edi]
mov edi, ebx
imul edi, esi
add edi, eax
shr edi, 0xc
mov eax, edi
cmp eax, 0xff
jbe 0x40bb0a
mov eax, 0xff
mov edi, dword [esp + 0x18]
mov byte [edi + ebp], al
mov edi, dword [esp + 0x4c]
mov ebx, 1
sub edi, esi
mov esi, 0x1000
cmp edi, esi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x28], ebx
jge 0x40ba0b
mov ebp, dword [esp + 0x8c]
test edi, edi
jle 0x40bbe7
test ebx, ebx
je 0x40bb67
mov eax, dword [esp + 0x3c]
mov edx, 0x800
add ebp, eax
mov dword [esp + 0x84], edx
mov dword [esp + 0x8c], ebp
mov eax, edx
mov dword [esp + 0x28], 0
cmp ebp, dword [esp + 0x40]
jae 0x40bc56
cmp ecx, dword [esp + 0x34]
jge 0x40bc56
mov ebx, dword [esp + 0x78]
cmp ebx, 8
je 0x40bbcc
cmp ebx, 0x18
jne 0x40bbe1
mov ebp, dword [esp + 0x14]
xor ebx, ebx
mov bl, byte [ecx + ebp]
imul ebx, edi
add edx, ebx
xor ebx, ebx
mov bl, byte [ecx + ebp + 1]
imul ebx, edi
add eax, ebx
xor ebx, ebx
mov bl, byte [ecx + ebp + 2]
mov ebp, dword [esp + 0x84]
imul ebx, edi
add ebp, ebx
mov dword [esp + 0x84], ebp
jmp 0x40bbda
mov esi, 0x1000
mov dword [esp + 0x28], 0
jmp 0x40bbe3
mov ebp, dword [esp + 0x14]
xor ebx, ebx
mov bl, byte [ecx + ebp]
imul ebx, edi
add eax, ebx
mov ebp, dword [esp + 0x8c]
sub esi, edi
mov ebx, dword [esp + 0x28]
mov edi, dword [esp + 0x50]
inc edi
mov dword [esp + 0x50], edi
mov edi, dword [esp + 0x3c]
add ecx, edi
mov edi, dword [esp + 0x70]
cmp dword [esp + 0x50], edi
jb 0x40b9fb
test esi, esi
jle 0x40bc73
sub ecx, dword [esp + 0x3c]
js 0x40bc73
cmp ecx, dword [esp + 0x34]
jge 0x40bc73
mov edi, dword [esp + 0x78]
cmp edi, 8
je 0x40bc65
cmp edi, 0x18
jne 0x40bc73
mov edi, dword [esp + 0x14]
xor ebx, ebx
mov bl, byte [ecx + edi]
imul ebx, esi
add edx, ebx
xor ebx, ebx
mov bl, byte [ecx + edi + 1]
imul ebx, esi
add eax, ebx
xor ebx, ebx
mov bl, byte [ecx + edi + 2]
mov ecx, dword [esp + 0x84]
imul ebx, esi
add ecx, ebx
mov dword [esp + 0x84], ecx
jmp 0x40bc73
mov esi, 0x1000
mov dword [esp + 0x28], 0
jmp 0x40bc08
mov edi, dword [esp + 0x14]
xor ebx, ebx
mov bl, byte [ecx + edi]
imul ebx, esi
add eax, ebx
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x78]
test ecx, ecx
jne 0x40bcfc
cmp edi, 8
je 0x40bce4
cmp edi, 0x18
jne 0x40bcfc
shr edx, 0xc
cmp edx, 0xff
jbe 0x40bc99
mov edx, 0xff
shr eax, 0xc
cmp eax, 0xff
jbe 0x40bca8
mov eax, 0xff
mov ecx, dword [esp + 0x84]
shr ecx, 0xc
cmp ecx, 0xff
mov dword [esp + 0x84], ecx
jbe 0x40bccc
mov dword [esp + 0x84], 0xff
mov esi, dword [esp + 0x18]
mov byte [esi + ebp + 1], al
mov al, byte [esp + 0x84]
mov byte [esi + ebp], dl
mov byte [esi + ebp + 2], al
jmp 0x40bd00
shr eax, 0xc
cmp eax, 0xff
jbe 0x40bcf3
mov eax, 0xff
mov esi, dword [esp + 0x18]
mov byte [esi + ebp], al
jmp 0x40bd00
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x7c]
lea eax, [ecx - 1]
mov ecx, dword [esp + 0x3c]
imul eax, ecx
cmp ebp, eax
jae 0x40bd42
add ebp, ecx
cmp edi, 8
je 0x40bd37
cmp edi, 0x18
jne 0x40bd3e
mov dl, byte [esi + ebp - 3]
mov byte [esi + ebp], dl
mov dl, byte [esi + ebp - 2]
mov byte [esi + ebp + 1], dl
mov dl, byte [esi + ebp - 1]
mov byte [esi + ebp + 2], dl
jmp 0x40bd3e
mov dl, byte [esi + ebp - 1]
mov byte [esi + ebp], dl
cmp ebp, eax
jb 0x40bd12
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x6c]
mov ecx, edx
mov ebx, ecx
add edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ebp, dword [esp + 0x34]
mov ecx, ebx
mov ebx, dword [esp + 0x54]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add eax, edx
mov ecx, dword [esp + 0x88]
mov edx, dword [esp + 0x94]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x5c]
inc eax
cmp eax, ecx
mov dword [esp + 0x5c], eax
jb 0x40b654
mov eax, dword [esp + 0x24]
push eax
call fcn.0040f94a
push ebx
call fcn.0040f94a
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0040f94a
mov edx, dword [esp + 0x1c]
push edx
call fcn.0040f94a
mov eax, dword [esp + 0x28]
push eax
call fcn.0040f94a
mov eax, dword [esp + 0x74]
add esp, 0x14
test eax, eax
je 0x40be21
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0040f94a
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov edx, dword [esp + 0x10]
push edx
call fcn.0040f94a
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040f94a
mov eax, dword [esp + 0x2c]
add esp, 8
test eax, eax
je 0x40be03
push eax
call fcn.0040f94a
add esp, 4
test ebx, ebx
je 0x40be10
push ebx
call fcn.0040f94a
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40be21
push eax
call fcn.0040f94a
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret