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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x18]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
movsx eax, word [edi]
mov dword [esi + 0x20], eax
movsx eax, word [edi + 4]
mov dword [esi + 0x24], eax
movsx eax, word [edi + 2]
mov dword [esi + 0x18], eax
movsx eax, word [edi + 6]
and edx, 2
test dx, dx
mov dword [esi + 0x1c], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], ecx
mov dword [ebp - 8], edx
jne 0x40f40e
test byte [ebp + 0x10], 4
je 0x40f40e
cmp eax, dword [esi + 0x20]
mov word [esi + 0xa6], 2
mov word [esi + 0xa8], 1
jne 0x40f3fe
cmp ecx, dword [esi + 0x24]
jne 0x40f3fe
mov dword [esi + 0x74], 0x40f08e
jmp 0x40f405
mov dword [esi + 0x74], 0x40f18d
mov dword [esi + 0x78], 0x40f0e5
jmp 0x40f440
and word [esi + 0xa8], 0
cmp eax, dword [esi + 0x20]
mov word [esi + 0xa6], 1
jne 0x40f432
cmp ecx, dword [esi + 0x24]
jne 0x40f432
mov dword [esi + 0x74], 0x40effe
jmp 0x40f439
mov dword [esi + 0x74], 0x40f13c
mov dword [esi + 0x78], 0x40f046
sub eax, ecx
shl eax, 2
mov ebx, eax
push ebx
push esi
call fcn.00410912
push ebx
push esi
mov dword [esi + 0x44], eax
call fcn.00410912
push ebx
push esi
mov dword [esi + 0x48], eax
call fcn.00410912
push ebx
push esi
mov dword [esi + 0x4c], eax
call fcn.00410912
and dword [esi + 0xa0], 0
xor ecx, ecx
mov cx, word [esi + 0xa8]
mov dword [esi + 0x50], eax
mov eax, dword [ebp + 0x2c]
mov dword [esi + 0x9c], eax
mov eax, dword [ebp + 0x24]
inc ecx
inc ecx
shl eax, cl
push eax
push esi
call fcn.00410912
mov ebx, eax
mov eax, dword [ebp + 0x30]
cmp eax, dword [eax + 0x10]
je 0x40f4a9
push eax
call fcn.0040ee15
mov eax, dword [ebp + 0x30]
mov ecx, dword [eax]
mov eax, dword [esi + 0x44]
and dword [ebp + 0xc], 0
mov dword [ebp + 0x14], eax
mov eax, dword [esi + 0x4c]
mov dword [ebp + 0x18], eax
mov eax, dword [esi + 0x48]
mov dword [ebp + 0x24], eax
mov eax, dword [esi + 0x50]
mov dword [ebp - 4], eax
mov ax, word [esi + 0x30]
cmp ax, word [esi + 0x2c]
mov dword [ebp + 8], ecx
jge 0x40f531
jmp 0x40f4f7
mov ecx, dword [ebp + 8]
jmp 0x40f4f7
xor edx, edx
mov dx, word [ecx + 2]
movsx ecx, word [esi + 0xa8]
shl dx, cl
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 4]
mov dword [ebp + 8], ecx
add dword [ebp + 0xc], edx
cmp word [ecx], ax
jle 0x40f4db
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x24]
add dword [ebp + 0x14], 4
add dword [ebp + 0x24], 4
mov dword [ecx], ebx
mov ecx, dword [ebp + 0x18]
add dword [ebp + 0x18], 4
mov dword [ecx], ebx
movsx ecx, word [ebp + 0xc]
shl ecx, 1
add ebx, ecx
mov dword [edx], ebx
mov edx, dword [ebp - 4]
add dword [ebp - 4], 4
mov dword [edx], ebx
add ebx, ecx
inc eax
cmp ax, word [esi + 0x2c]
jl 0x40f4d6
cmp word [ebp - 8], 0
jne 0x40f653
movsx eax, word [edi + 2]
movsx ebx, word [edi + 6]
sub ebx, eax
shl ebx, 2
push ebx
push esi
call fcn.0041092f
push ebx
push esi
mov dword [esi + 0x5c], eax
call fcn.0041092f
push ebx
push esi
mov dword [esi + 0x60], eax
call fcn.0041092f
push ebx
push esi
mov dword [esi + 0x64], eax
call fcn.0041092f
cmp dword [ebp + 0x1c], 0
mov dword [esi + 0x68], eax
je 0x40f58a
push dword [ebp + 0x20]
push esi
call fcn.0041092f
mov dword [esi + 0x40], eax
mov dword [esi + 0x3c], 0x7fffffff
mov eax, dword [ebp + 0x28]
xor ecx, ecx
mov cx, word [esi + 0xa8]
inc ecx
inc ecx
shl eax, cl
push eax
push esi
call fcn.0041092f
mov edx, dword [esi + 0x5c]
mov ecx, dword [ebp + 0x30]
mov ecx, dword [ecx + 4]
and dword [ebp + 0xc], 0
mov dword [ebp + 0x30], edx
mov edx, dword [esi + 0x64]
mov dword [ebp + 0x14], edx
mov edx, dword [esi + 0x60]
mov dword [ebp + 0x18], edx
mov edx, dword [esi + 0x68]
mov dword [ebp + 0x24], edx
mov dx, word [edi + 2]
cmp dx, word [edi + 6]
mov dword [ebp + 8], ecx
jge 0x40f62d
jmp 0x40f5f3
mov ecx, dword [ebp + 8]
jmp 0x40f5f3
xor ebx, ebx
mov bx, word [ecx + 2]
movsx ecx, word [esi + 0xa8]
shl bx, cl
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 4]
mov dword [ebp + 8], ecx
add dword [ebp + 0xc], ebx
cmp word [ecx], dx
jle 0x40f5d7
mov ecx, dword [ebp + 0x30]
mov ebx, dword [ebp + 0x18]
add dword [ebp + 0x30], 4
add dword [ebp + 0x18], 4
mov dword [ecx], eax
mov ecx, dword [ebp + 0x14]
add dword [ebp + 0x14], 4
mov dword [ecx], eax
movsx ecx, word [ebp + 0xc]
shl ecx, 1
add eax, ecx
mov dword [ebx], eax
mov ebx, dword [ebp + 0x24]
add dword [ebp + 0x24], 4
mov dword [ebx], eax
add eax, ecx
inc edx
cmp dx, word [edi + 6]
jl 0x40f5d2
test byte [ebp + 0x10], 4
je 0x40f653
mov edi, dword [ebp + 0x2c]
shl edi, 2
push edi
push esi
call fcn.0041092f
push edi
push esi
mov dword [esi + 0x94], eax
call fcn.0041092f
mov dword [esi + 0x98], eax
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x2c