Function at 0x438118
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 0x438538
mov ebx, dword [ebp + 0x34]
test esi, esi
je 0x438531
mov edi, dword [esi + 0x34]
mov ecx, dword [ebx + 0x78]
mov eax, dword [ebx + 0x7c]
mov dword [esp + 0x24], eax
test edx, edx
je 0x4383b3
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 0x438233
mov eax, dword [edi + 0x90]
movsx ebp, byte [esp + 0x5c]
cmp ebp, 0xb
je 0x43820b
movsx ebp, byte [esp + 0x5c]
cmp ebp, 0xc
je 0x4381e6
mov eax, esi
call fcn.00408764
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 0x4381cf
mov byte [edi + 0x86], 1
jmp 0x4381dc
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.0043854c
jmp 0x43818c
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.00439390
jmp 0x43818c
lea eax, [ecx + ecx]
add eax, eax
cmp ecx, 0x2000
jg 0x438374
mov ebp, dword [esp + 0x24]
imul ebp, eax
lea ebp, [ebp + eax + 4]
push ebp
mov dword [esp + 0x20], ecx
call fcn.00466ddc
mov ecx, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x20], eax
mov ebp, eax
test ebp, ebp
je 0x438337
mov ebp, dword [esp + 0x20]
test ebp, ebp
jne 0x438283
mov eax, 0xffffffff
add esp, 0x28
pop ebx
pop ebp
pop esi
pop edi
ret
movsx ebp, byte [esp + 0x5c]
cmp ebp, 0xb
je 0x438303
movsx ebp, byte [esp + 0x5c]
cmp ebp, 0xc
je 0x4382d2
mov ebp, dword [edi + 0x90]
test ebp, ebp
je 0x4382b2
push ebp
mov dword [esp + 0x20], ecx
call fcn.0046703f
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.00408764
jmp 0x438193
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.0043854c
mov ecx, dword [esp + 0x1c]
jmp 0x438297
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.00439390
mov ecx, dword [esp + 0x1c]
jmp 0x438297
mov ebp, dword [esp + 0x24]
push ebp
push ecx
push 0
push 0x80742c
push 0x806270
mov dword [esp + 0x30], ecx
call fcn.00464d5c
mov ecx, dword [esp + 0x30]
push 0
push 1
push 0x1965e
mov dword [esp + 0x3c], ecx
call fcn.00463ec8
mov ecx, dword [esp + 0x3c]
add esp, 0x20
jmp 0x43826e
mov ebp, dword [esp + 0x24]
push ebp
push ecx
push 0x807404
push 0x806270
mov dword [esp + 0x2c], ecx
call fcn.0040c5f0
mov ecx, dword [esp + 0x2c]
push 1
push 0x186aa
mov dword [esp + 0x34], ecx
call fcn.00463f24
mov ecx, dword [esp + 0x34]
add esp, 0x18
xor ebp, ebp
mov dword [esp + 0x20], ebp
jmp 0x43826e
mov edi, ebx
lea esi, [ecx + ecx]
add esi, esi
cmp ecx, 0x2000
jg 0x4384f4
mov edx, eax
imul edx, esi
lea esi, [edx + esi + 4]
push esi
mov dword [esp + 0x20], ecx
call fcn.00466ddc
mov ecx, dword [esp + 0x20]
add esp, 4
mov dword [esp + 0x20], eax
mov edx, eax
test edx, edx
je 0x4384b7
mov edx, dword [esp + 0x20]
test edx, edx
jne 0x438403
mov eax, 0xffffffff
add esp, 0x28
pop ebx
pop ebp
pop esi
pop edi
ret
movsx edx, byte [esp + 0x5c]
cmp edx, 0xb
je 0x438483
movsx edx, byte [esp + 0x5c]
cmp edx, 0xc
je 0x438452
mov edx, dword [ebx + 0x90]
test edx, edx
je 0x438432
push edx
mov dword [esp + 0x20], ecx
call fcn.0046703f
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.00408764
jmp 0x438193
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.0043854c
mov ecx, dword [esp + 0x1c]
jmp 0x438417
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.00439390
mov ecx, dword [esp + 0x1c]
jmp 0x438417
mov edx, dword [esp + 0x24]
push edx
push ecx
push 0
push 0x80742c
push 0x806270
mov dword [esp + 0x30], ecx
call fcn.00464d5c
mov ecx, dword [esp + 0x30]
push 0
push 1
push 0x1965e
mov dword [esp + 0x3c], ecx
call fcn.00463ec8
mov ecx, dword [esp + 0x3c]
add esp, 0x20
jmp 0x4383ee
mov edx, eax
push edx
push ecx
push 0x807404
push 0x806270
mov dword [esp + 0x2c], ecx
call fcn.0040c5f0
mov ecx, dword [esp + 0x2c]
push 1
push 0x186aa
mov dword [esp + 0x34], ecx
call fcn.00463f24
mov ecx, dword [esp + 0x34]
add esp, 0x18
xor edx, edx
mov dword [esp + 0x20], edx
jmp 0x4383ee
xor edi, edi
jmp 0x43813e
xor ebx, ebx
jmp 0x438133