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

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x28
mov esi, edx
mov ebp, eax
movsx edx, byte [esp + 0x58]
test ebp, ebp
je 0x438a88
mov ebx, dword [ebp + 0x34]
test esi, esi
je 0x438a81
mov edi, dword [esi + 0x34]
mov ecx, dword [ebx + 0x78]
mov eax, dword [ebx + 0x7c]
mov dword [esp + 0x24], eax
test edx, edx
je 0x438903
mov ebp, dword [edi + 0x78]
imul ebp, dword [edi + 0x7c]
add ebp, ebp
add ebp, ebp
mov eax, ecx
imul eax, dword [esp + 0x24]
add eax, eax
add eax, eax
cmp ebp, eax
jne 0x438783
mov eax, dword [edi + 0x90]
movsx ebp, byte [esp + 0x5c]
cmp ebp, 0xb
je 0x43875b
movsx ebp, byte [esp + 0x5c]
cmp ebp, 0xc
je 0x438736
mov eax, esi
call fcn.0040870c
mov eax, 0xb60b60b7
mov ecx, dword [esp + 0x54]
imul ecx
add edx, ecx
sar edx, 7
mov ebp, ecx
sar ebp, 0x1f
sub edx, ebp
lea esi, [edx + edx]
add esi, esi
sub esi, edx
add esi, esi
add esi, esi
lea eax, [esi + esi]
add eax, eax
add eax, eax
add eax, eax
sub eax, esi
sub ecx, eax
test ecx, ecx
je 0x43871f
mov byte [edi + 0x86], 1
jmp 0x43872c
movzx eax, byte [ebx + 0x86]
mov byte [edi + 0x86], al
xor eax, eax
add esp, 0x28
pop ebx
pop ebp
pop esi
pop edi
ret
mov ebp, dword [esp + 0x24]
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x54]
mov dword [esp + 0x18], ebp
mov edx, dword [ebx + 0x90]
call fcn.00438a9c
jmp 0x4386dc
mov ebp, dword [esp + 0x24]
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x54]
mov dword [esp + 0x18], ebp
mov edx, dword [ebx + 0x90]
call fcn.004398e0
jmp 0x4386dc
lea eax, [ecx + ecx]
add eax, eax
cmp ecx, 0x2000
jg 0x4388c4
mov ebp, dword [esp + 0x24]
imul ebp, eax
lea ebp, [ebp + eax + 4]
push ebp
mov dword [esp + 0x20], ecx
call fcn.004696fc
mov ecx, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x20], eax
mov ebp, eax
test ebp, ebp
je 0x438887
mov ebp, dword [esp + 0x20]
test ebp, ebp
jne 0x4387d3
mov eax, 0xffffffff
add esp, 0x28
pop ebx
pop ebp
pop esi
pop edi
ret
movsx ebp, byte [esp + 0x5c]
cmp ebp, 0xb
je 0x438853
movsx ebp, byte [esp + 0x5c]
cmp ebp, 0xc
je 0x438822
mov ebp, dword [edi + 0x90]
test ebp, ebp
je 0x438802
push ebp
mov dword [esp + 0x20], ecx
call fcn.0046995f
mov ecx, dword [esp + 0x20]
add esp, 4
mov ebp, dword [esp + 0x20]
mov dword [edi + 0x90], ebp
mov dword [edi + 0x78], ecx
mov ecx, dword [esp + 0x24]
mov dword [edi + 0x7c], ecx
mov eax, esi
call fcn.0040870c
jmp 0x4386e3
mov ebp, dword [esp + 0x24]
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x54]
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x20]
mov edx, dword [ebx + 0x90]
mov dword [esp + 0x1c], ecx
call fcn.00438a9c
mov ecx, dword [esp + 0x1c]
jmp 0x4387e7
mov ebp, dword [esp + 0x24]
mov dword [esp + 0xc], ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x54]
mov dword [esp + 0x18], ebp
mov eax, dword [esp + 0x20]
mov edx, dword [ebx + 0x90]
mov dword [esp + 0x1c], ecx
call fcn.004398e0
mov ecx, dword [esp + 0x1c]
jmp 0x4387e7
mov ebp, dword [esp + 0x24]
push ebp
push ecx
push 0
push 0x80f5a4
push 0x80e270
mov dword [esp + 0x30], ecx
call fcn.0049acf0
mov ecx, dword [esp + 0x30]
push 0
push 1
push 0x1965e
mov dword [esp + 0x3c], ecx
call fcn.004667e0
mov ecx, dword [esp + 0x3c]
add esp, 0x20
jmp 0x4387be
mov ebp, dword [esp + 0x24]
push ebp
push ecx
push 0x80f57c
push 0x80e270
mov dword [esp + 0x2c], ecx
call fcn.0040c598
mov ecx, dword [esp + 0x2c]
push 1
push 0x186aa
mov dword [esp + 0x34], ecx
call fcn.0046683c
mov ecx, dword [esp + 0x34]
add esp, 0x18
xor ebp, ebp
mov dword [esp + 0x20], ebp
jmp 0x4387be
mov edi, ebx
lea esi, [ecx + ecx]
add esi, esi
cmp ecx, 0x2000
jg 0x438a44
mov edx, eax
imul edx, esi
lea esi, [edx + esi + 4]
push esi
mov dword [esp + 0x20], ecx
call fcn.004696fc
mov ecx, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x20], eax
mov edx, eax
test edx, edx
je 0x438a07
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x438953
mov eax, 0xffffffff
add esp, 0x28
pop ebx
pop ebp
pop esi
pop edi
ret
movsx edx, byte [esp + 0x5c]
cmp edx, 0xb
je 0x4389d3
movsx edx, byte [esp + 0x5c]
cmp edx, 0xc
je 0x4389a2
mov edx, dword [ebx + 0x90]
test edx, edx
je 0x438982
push edx
mov dword [esp + 0x20], ecx
call fcn.0046995f
mov ecx, dword [esp + 0x20]
add esp, 4
mov edx, dword [esp + 0x20]
mov dword [ebx + 0x90], edx
mov dword [ebx + 0x78], ecx
mov ecx, dword [esp + 0x24]
mov dword [ebx + 0x7c], ecx
mov eax, ebp
call fcn.0040870c
jmp 0x4386e3
mov esi, dword [esp + 0x24]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], esi
mov edx, dword [esp + 0x54]
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x20]
mov edx, dword [ebx + 0x90]
mov dword [esp + 0x1c], ecx
call fcn.00438a9c
mov ecx, dword [esp + 0x1c]
jmp 0x438967
mov esi, dword [esp + 0x24]
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], esi
mov edx, dword [esp + 0x54]
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x20]
mov edx, dword [ebx + 0x90]
mov dword [esp + 0x1c], ecx
call fcn.004398e0
mov ecx, dword [esp + 0x1c]
jmp 0x438967
mov edx, dword [esp + 0x24]
push edx
push ecx
push 0
push 0x80f5a4
push 0x80e270
mov dword [esp + 0x30], ecx
call fcn.0049acf0
mov ecx, dword [esp + 0x30]
push 0
push 1
push 0x1965e
mov dword [esp + 0x3c], ecx
call fcn.004667e0
mov ecx, dword [esp + 0x3c]
add esp, 0x20
jmp 0x43893e
mov edx, eax
push edx
push ecx
push 0x80f57c
push 0x80e270
mov dword [esp + 0x2c], ecx
call fcn.0040c598
mov ecx, dword [esp + 0x2c]
push 1
push 0x186aa
mov dword [esp + 0x34], ecx
call fcn.0046683c
mov ecx, dword [esp + 0x34]
add esp, 0x18
xor edx, edx
mov dword [esp + 0x20], edx
jmp 0x43893e
xor edi, edi
jmp 0x43868e
xor ebx, ebx
jmp 0x438683