Function at 0x40b5d0
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 0x40b5f1
cmp ebx, 8
jne 0x40c051
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
cmp ecx, eax
jge 0x40c051
mov ecx, dword [esp + 0x80]
cmp eax, ecx
jle 0x40b619
mov dword [esp + 0x88], ecx
fild dword [esp + 0x7c]
fidiv dword [esp + 0x70]
fmul dword [0x43f3d4]
fadd dword [0x43f2e8]
call fcn.0040f6c8
fild dword [esp + 0x80]
mov dword [esp + 0x58], eax
fidiv dword [esp + 0x74]
fmul dword [0x43f3d4]
fadd dword [0x43f2e8]
call fcn.0040f6c8
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.0040fda3
add esp, 8
mov dword [esp + 0x10], eax
test eax, eax
je 0x40c051
lea eax, [esi + 6]
push 1
push eax
call fcn.0040fda3
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x40b6ee
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040fb3a
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
lea ebx, [edi*4]
push ebx
call fcn.0040ff21
push ebx
mov dword [esp + 0x2c], eax
call fcn.0040ff21
mov ebx, eax
lea eax, [edi*4]
push eax
mov dword [esp + 0x60], ebx
call fcn.0040ff21
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x30]
add esp, 0xc
test eax, eax
je 0x40c00b
test ebx, ebx
je 0x40c00b
mov ecx, dword [esp + 0x2c]
test ecx, ecx
je 0x40c00b
test edi, edi
jbe 0x40b767
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 0x40b74d
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x74]
cmp edx, eax
jne 0x40b780
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
jmp 0x40b7e7
lea eax, [ebp + 6]
push 1
push eax
call fcn.0040fda3
xor edi, edi
add esp, 8
cmp eax, edi
mov dword [esp + 0x14], eax
jne 0x40b7df
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0040fb3a
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x14], edi
push edx
call fcn.0040fb3a
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x20], edi
push eax
call fcn.0040fb3a
push ebx
mov dword [esp + 0x34], edi
call fcn.0040fb3a
mov ecx, dword [esp + 0x3c]
xor ebx, ebx
push ecx
mov dword [esp + 0x68], ebx
call fcn.0040fb3a
add esp, 0x14
mov dword [esp + 0x2c], edi
mov dword [esp + 0x60], 1
mov ecx, dword [esp + 0x84]
test ecx, ecx
jg 0x40b806
mov eax, dword [esp + 0x88]
test eax, eax
jle 0x40b85e
cmp eax, dword [esp + 0x80]
jge 0x40b85e
imul esi, ecx
test ecx, ecx
mov dword [esp + 0x44], esi
jle 0x40b85e
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 0x40b85e
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 0x40bfbd
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x74]
cmp eax, ecx
jne 0x40b8c6
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 0x40bbc1
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x70]
cmp edx, 0x1000
jge 0x40b9fa
test eax, eax
je 0x40b91e
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jge 0x40b91a
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 0x40b9b7
cmp eax, 0x18
jne 0x40b9d6
mov ecx, dword [esp + 0x10]
test edi, edi
jbe 0x40b9d6
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 0x40b959
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x70]
jmp 0x40b9d6
xor eax, eax
test edi, edi
jbe 0x40b9d6
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 0x40b9bd
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 0x40b8da
jmp 0x40b9fe
test eax, eax
je 0x40ba4b
mov eax, dword [esp + 0x74]
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
jge 0x40ba3a
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 0x40bb5a
cmp eax, 0x18
jne 0x40bb95
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x14]
mov ebp, dword [esp + 0x10]
test eax, eax
jbe 0x40bb95
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 0x40bae3
mov eax, 0xff
shr edi, 0xc
cmp edi, 0xff
mov dword [esp + 0x4c], edi
jbe 0x40baf9
mov ebx, 0xff
jmp 0x40bafd
mov bl, byte [esp + 0x4c]
shr edx, 0xc
cmp edx, 0xff
jbe 0x40bb0d
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 0x40ba99
mov ebx, dword [esp + 0x54]
mov edx, dword [esp + 0x94]
jmp 0x40bb95
xor ecx, ecx
test edi, edi
jbe 0x40bb95
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 0x40bb86
mov eax, 0xff
mov byte [esi], al
mov dword [ebx + ecx*4], 0x800
inc ecx
inc esi
cmp ecx, edi
jb 0x40bb6a
sub edx, dword [esp + 0x30]
mov dword [esp + 0x94], edx
jne 0x40bbb5
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 0x40bbf7
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 0x40bf9a
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 0x40be38
mov edi, dword [esp + 0x58]
cmp edi, esi
mov dword [esp + 0x4c], edi
jl 0x40bd68
mov ebp, dword [esp + 0x8c]
test ebx, ebx
je 0x40bc61
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 0x40bded
cmp ecx, dword [esp + 0x34]
jge 0x40bded
mov edi, dword [esp + 0x78]
cmp edi, 8
je 0x40bd19
cmp edi, 0x18
jne 0x40bd41
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 0x40bcd4
mov edx, 0xff
shr eax, 0xc
cmp eax, 0xff
jbe 0x40bce3
mov eax, 0xff
shr edi, 0xc
cmp edi, 0xff
mov dword [esp + 0x84], edi
jbe 0x40bd00
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 0x40bd41
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 0x40bd3a
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 0x40bc3b
mov ebp, dword [esp + 0x8c]
test edi, edi
jle 0x40be17
test ebx, ebx
je 0x40bd97
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 0x40be86
cmp ecx, dword [esp + 0x34]
jge 0x40be86
mov ebx, dword [esp + 0x78]
cmp ebx, 8
je 0x40bdfc
cmp ebx, 0x18
jne 0x40be11
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 0x40be0a
mov esi, 0x1000
mov dword [esp + 0x28], 0
jmp 0x40be13
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 0x40bc2b
test esi, esi
jle 0x40bea3
sub ecx, dword [esp + 0x3c]
js 0x40bea3
cmp ecx, dword [esp + 0x34]
jge 0x40bea3
mov edi, dword [esp + 0x78]
cmp edi, 8
je 0x40be95
cmp edi, 0x18
jne 0x40bea3
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 0x40bea3
mov esi, 0x1000
mov dword [esp + 0x28], 0
jmp 0x40be38
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 0x40bf2c
cmp edi, 8
je 0x40bf14
cmp edi, 0x18
jne 0x40bf2c
shr edx, 0xc
cmp edx, 0xff
jbe 0x40bec9
mov edx, 0xff
shr eax, 0xc
cmp eax, 0xff
jbe 0x40bed8
mov eax, 0xff
mov ecx, dword [esp + 0x84]
shr ecx, 0xc
cmp ecx, 0xff
mov dword [esp + 0x84], ecx
jbe 0x40befc
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 0x40bf30
shr eax, 0xc
cmp eax, 0xff
jbe 0x40bf23
mov eax, 0xff
mov esi, dword [esp + 0x18]
mov byte [esi + ebp], al
jmp 0x40bf30
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 0x40bf72
add ebp, ecx
cmp edi, 8
je 0x40bf67
cmp edi, 0x18
jne 0x40bf6e
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 0x40bf6e
mov dl, byte [esi + ebp - 1]
mov byte [esi + ebp], dl
cmp ebp, eax
jb 0x40bf42
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 0x40b884
mov eax, dword [esp + 0x24]
push eax
call fcn.0040fb3a
push ebx
call fcn.0040fb3a
mov ecx, dword [esp + 0x34]
push ecx
call fcn.0040fb3a
mov edx, dword [esp + 0x1c]
push edx
call fcn.0040fb3a
mov eax, dword [esp + 0x28]
push eax
call fcn.0040fb3a
mov eax, dword [esp + 0x74]
add esp, 0x14
test eax, eax
je 0x40c051
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0040fb3a
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov edx, dword [esp + 0x10]
push edx
call fcn.0040fb3a
mov eax, dword [esp + 0x1c]
push eax
call fcn.0040fb3a
mov eax, dword [esp + 0x2c]
add esp, 8
test eax, eax
je 0x40c033
push eax
call fcn.0040fb3a
add esp, 4
test ebx, ebx
je 0x40c040
push ebx
call fcn.0040fb3a
add esp, 4
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x40c051
push eax
call fcn.0040fb3a
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret