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

Disassembly:
sub esp, 0x88
mov eax, dword [esp + 0x8c]
xor ecx, ecx
push ebx
mov bl, byte [esp + 0x9c]
mov edx, dword [eax + 0xc20]
mov cl, byte [eax + 0xc2c]
mov dword [esp + 0x44], edx
push ebp
shl ecx, 4
add edx, 0x7f
push esi
mov esi, dword [eax + 0xc24]
add ecx, 0x4ef444
shr edx, 7
test bl, bl
push edi
mov dword [esp + 0x94], esi
je 0x409a16
lea esi, [eax + 0x41c]
mov dword [esp + 0x18], esi
jmp 0x409a1e
mov dword [esp + 0x18], 0
mov ebp, dword [eax + 0xc1c]
mov esi, dword [eax]
mov eax, dword [eax + 0xc28]
mov ecx, dword [ecx + 4]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x54], esi
mov dword [esp + 0x4c], ecx
mov ebx, dword [eax + 8]
mov edi, dword [eax]
mov ecx, dword [eax + 0xc]
mov esi, dword [eax + 4]
mov eax, dword [esp + 0xa4]
sub ecx, esi
sub ebx, edi
mov dword [esp + 0x20], ecx
mov esi, dword [eax]
mov edi, dword [eax + 4]
mov ecx, esi
mov eax, edi
lea esi, [esi + ebx + 0x7f]
mov dword [esp + 0x3c], ebx
shr ecx, 7
shr esi, 7
sub esi, ecx
shr eax, 7
mov dword [esp + 0x2c], esi
mov esi, eax
imul eax, edx
shl esi, 7
add eax, ecx
mov ebx, esi
sub ebx, edi
lea esi, [ebp + eax*4]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x14], ebx
lea eax, [edi + eax + 0x7f]
shr eax, 7
imul eax, edx
lea edi, [ebp + eax*4]
cmp edi, esi
mov dword [esp + 0x40], edi
jbe 0x409cf2
shl ecx, 7
mov dword [esp + 0x44], ecx
mov ecx, dword [esp + 0x2c]
sub edx, ecx
lea ecx, [ebx + 0x80]
shl edx, 2
mov dword [esp + 0x48], edx
mov dword [esp + 0x30], ecx
mov edx, dword [esp + 0x20]
xor eax, eax
test ebx, ebx
setl al
dec eax
mov dword [esp + 0x28], ecx
and eax, ebx
cmp ecx, edx
mov dword [esp + 0x5c], eax
jl 0x409aec
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0xa4]
mov ebp, dword [esp + 0x44]
sub ebp, dword [edx]
mov edx, dword [esp + 0x2c]
lea edx, [esi + edx*4]
cmp edx, esi
mov dword [esp + 0x38], edx
jbe 0x409cd0
sub eax, ebx
mov dword [esp + 0x58], eax
lea eax, [ebp + 0x80]
mov dword [esp + 0x1c], eax
jmp 0x409b22
mov eax, dword [esp + 0x1c]
xor ecx, ecx
mov dword [esp + 0x24], eax
test ebp, ebp
setl cl
dec ecx
and ecx, ebp
mov edi, ecx
mov ecx, dword [esp + 0x3c]
cmp eax, ecx
jl 0x409b3e
mov dword [esp + 0x24], ecx
mov eax, dword [esi]
mov byte [esp + 0x13], 0
test eax, eax
jne 0x409b7d
mov ecx, 0x526f48
mov byte [esp + 0x13], 1
call fcn.0040a080
mov dword [esi], eax
lea edx, [eax + eax*2]
mov eax, dword [0x526f4c]
lea ebx, [eax + edx*8 - 0x18]
push ebx
call fcn.00409d00
mov dword [ebx + 0x10], 0x180
mov dword [ebx + 0xc], esi
mov ebx, dword [esp + 0x18]
add esp, 4
mov eax, dword [esi]
test eax, eax
je 0x409bb2
mov ecx, dword [0x526f64]
mov edx, dword [0x526f4c]
mov ebx, ecx
shl ebx, 4
add ebx, ecx
lea ecx, [eax + eax*2]
lea edx, [edx + ecx*8 - 0x18]
mov ecx, 0x526f48
push edx
call dword [ebx*4 + 0x4ef954]
mov ebx, dword [esp + 0x14]
test al, al
jne 0x409bbe
mov al, byte [esp + 0x13]
test al, al
je 0x409c4a
mov ecx, dword [esp + 0xa4]
mov edx, dword [esp + 0x50]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
add eax, ebp
add ecx, ebx
sub edx, eax
mov dword [esp + 0x60], eax
cmp edx, 0x80
mov dword [esp + 0x64], ecx
jb 0x409be9
mov edx, 0x80
mov eax, dword [esp + 0x94]
sub eax, ecx
cmp eax, 0x80
jb 0x409bfe
mov eax, 0x80
xor ecx, ecx
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x9c]
mov dword [esp + 0x88], edx
push eax
mov eax, dword [esp + 0x38]
lea edx, [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x5c]
push edx
push eax
mov eax, dword [esi]
lea edx, [esp + 0x90]
push ecx
push edx
push eax
call dword [esp + 0x68]
add esp, 0x1c
mov ecx, dword [esp + 0xa0]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
lea edx, [eax + edi]
sub edi, ebp
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0x5c]
add edx, ecx
mov dword [esp + 0x68], edi
mov dword [esp + 0x74], edx
mov edx, dword [esp + 0x24]
add eax, edx
mov edx, dword [esp + 0x18]
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x28]
add ecx, eax
lea eax, [esp + 0x68]
mov dword [esp + 0x7c], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp + 0x6c], ecx
push edx
mov edx, dword [esi]
lea ecx, [esp + 0x74]
push eax
push ecx
push edx
mov ecx, 0x526f48
call fcn.004069b0
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
add esi, 4
add ebp, 0x80
add ecx, 0x80
cmp esi, eax
mov dword [esp + 0x1c], ecx
jb 0x409b1e
mov edi, dword [esp + 0x40]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x48]
add ebx, 0x80
add esi, eax
add ecx, 0x80
cmp edi, esi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x30], ecx
ja 0x409ace
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x88
ret