Function at 0x40b480
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 0x40b4a1
cmp ebx, 8
jne 0x40bf01
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
cmp ecx, eax
jge 0x40bf01
mov ecx, dword [esp + 0x80]
cmp eax, ecx
jle 0x40b4c9
mov dword [esp + 0x88], ecx
fild dword [esp + 0x7c]
fidiv dword [esp + 0x70]
fmul dword [0x43f3d4]
fadd dword [0x43f2e8]
call fcn.0040f5d8
fild dword [esp + 0x80]
mov dword [esp + 0x58], eax
fidiv dword [esp + 0x74]
fmul dword [0x43f3d4]
fadd dword [0x43f2e8]
call fcn.0040f5d8
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.0040fcb3
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x40bf01
lea eax, [esi + 6]
push 1
push eax
call fcn.0040fcb3
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40b59e
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040fa4a
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
lea ebx, [edi*4]
push ebx
call fcn.0040fe70
push ebx
mov dword [esp + 0x2c], eax
call fcn.0040fe70
mov ebx, eax
lea eax, [edi*4]
push eax
mov dword [esp + 0x60], ebx
call fcn.0040fe70
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x30]
add esp, 0xc
test eax, eax
je 0x40bebb
test ebx, ebx
je 0x40bebb
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x40bebb
test edi, edi
jbe 0x40b617
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 0x40b5fd
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x74]
cmp edx, eax
jne 0x40b630
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
jmp 0x40b697
lea eax, [ebp + 6]
push 1
push eax
call fcn.0040fcb3
xor edi, edi
add esp, 8
cmp eax, edi
mov dword [esp + 0x14], eax
jne 0x40b68f
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040fa4a
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x14], edi
push edx
call fcn.0040fa4a
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], edi
push eax
call fcn.0040fa4a
push ebx
mov dword [esp + 0x34], edi
call fcn.0040fa4a
mov ecx, dword [esp + 0x3c]
xor ebx, ebx
push ecx
mov dword [esp + 0x68], ebx
call fcn.0040fa4a
add esp, 0x14
mov dword [esp + 0x2c], edi
mov dword [esp + 0x60], 1
mov ecx, dword [esp + 0x84]
test ecx, ecx
jg 0x40b6b6
mov eax, dword [esp + 0x88]
test eax, eax
jle 0x40b70e
cmp eax, dword [esp + 0x80]
jge 0x40b70e
imul esi, ecx
test ecx, ecx
mov dword [esp + 0x44], esi
jle 0x40b70e
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 0x40b70e
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 0x40be6d
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x74]
cmp eax, ecx
jne 0x40b776
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 0x40ba71
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x70]
cmp edx, 0x1000
jge 0x40b8aa
test eax, eax
je 0x40b7ce
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jge 0x40b7ca
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 0x40b867
cmp eax, 0x18
jne 0x40b886
mov ecx, dword [esp + 0x10]
test edi, edi
jbe 0x40b886
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 0x40b809
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x70]
jmp 0x40b886
xor eax, eax
test edi, edi
jbe 0x40b886
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 0x40b86d
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 0x40b78a
jmp 0x40b8ae
test eax, eax
je 0x40b8fb
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jge 0x40b8ea
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 0x40ba0a
cmp eax, 0x18
jne 0x40ba45
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
test eax, eax
jbe 0x40ba45
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 0x40b993
mov eax, 0xff
shr edi, 0xc
cmp edi, 0xff
mov dword [esp + 0x4c], edi
jbe 0x40b9a9
mov ebx, 0xff
jmp 0x40b9ad
mov bl, byte [esp + 0x4c]
shr edx, 0xc
cmp edx, 0xff
jbe 0x40b9bd
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 0x40b949
mov ebx, dword [esp + 0x54]
mov edx, dword [esp + 0x94]
jmp 0x40ba45
xor ecx, ecx
test edi, edi
jbe 0x40ba45
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 0x40ba36
mov eax, 0xff
mov byte [esi], al
mov dword [ebx + ecx*4], 0x800
inc ecx
inc esi
cmp ecx, edi
jb 0x40ba1a
sub edx, dword [esp + 0x30]
mov dword [esp + 0x94], edx
jne 0x40ba65
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 0x40baa7
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 0x40be4a
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 0x40bce8
mov edi, dword [esp + 0x58]
cmp edi, esi
mov dword [esp + 0x4c], edi
jl 0x40bc18
mov ebp, dword [esp + 0x8c]
test ebx, ebx
je 0x40bb11
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 0x40bc9d
cmp ecx, dword [esp + 0x34]
jge 0x40bc9d
mov edi, dword [esp + 0x78]
cmp edi, 8
je 0x40bbc9
cmp edi, 0x18
jne 0x40bbf1
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 0x40bb84
mov edx, 0xff
shr eax, 0xc
cmp eax, 0xff
jbe 0x40bb93
mov eax, 0xff
shr edi, 0xc
cmp edi, 0xff
mov dword [esp + 0x84], edi
jbe 0x40bbb0
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 0x40bbf1
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 0x40bbea
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 0x40baeb
mov ebp, dword [esp + 0x8c]
test edi, edi
jle 0x40bcc7
test ebx, ebx
je 0x40bc47
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 0x40bd36
cmp ecx, dword [esp + 0x34]
jge 0x40bd36
mov ebx, dword [esp + 0x78]
cmp ebx, 8
je 0x40bcac
cmp ebx, 0x18
jne 0x40bcc1
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 0x40bcba
mov esi, 0x1000
mov dword [esp + 0x28], 0
jmp 0x40bcc3
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 0x40badb
test esi, esi
jle 0x40bd53
sub ecx, dword [esp + 0x3c]
js 0x40bd53
cmp ecx, dword [esp + 0x34]
jge 0x40bd53
mov edi, dword [esp + 0x78]
cmp edi, 8
je 0x40bd45
cmp edi, 0x18
jne 0x40bd53
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 0x40bd53
mov esi, 0x1000
mov dword [esp + 0x28], 0
jmp 0x40bce8
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 0x40bddc
cmp edi, 8
je 0x40bdc4
cmp edi, 0x18
jne 0x40bddc
shr edx, 0xc
cmp edx, 0xff
jbe 0x40bd79
mov edx, 0xff
shr eax, 0xc
cmp eax, 0xff
jbe 0x40bd88
mov eax, 0xff
mov ecx, dword [esp + 0x84]
shr ecx, 0xc
cmp ecx, 0xff
mov dword [esp + 0x84], ecx
jbe 0x40bdac
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 0x40bde0
shr eax, 0xc
cmp eax, 0xff
jbe 0x40bdd3
mov eax, 0xff
mov esi, dword [esp + 0x18]
mov byte [esi + ebp], al
jmp 0x40bde0
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 0x40be22
add ebp, ecx
cmp edi, 8
je 0x40be17
cmp edi, 0x18
jne 0x40be1e
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 0x40be1e
mov dl, byte [esi + ebp - 1]
mov byte [esi + ebp], dl
cmp ebp, eax
jb 0x40bdf2
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 0x40b734
mov eax, dword [esp + 0x24]
push eax
call fcn.0040fa4a
push ebx
call fcn.0040fa4a
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0040fa4a
mov edx, dword [esp + 0x1c]
push edx
call fcn.0040fa4a
mov eax, dword [esp + 0x28]
push eax
call fcn.0040fa4a
mov eax, dword [esp + 0x74]
add esp, 0x14
test eax, eax
je 0x40bf01
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0040fa4a
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov edx, dword [esp + 0x10]
push edx
call fcn.0040fa4a
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040fa4a
mov eax, dword [esp + 0x2c]
add esp, 8
test eax, eax
je 0x40bee3
push eax
call fcn.0040fa4a
add esp, 4
test ebx, ebx
je 0x40bef0
push ebx
call fcn.0040fa4a
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40bf01
push eax
call fcn.0040fa4a
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret