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

Disassembly:
sub esp, 0x40
mov eax, dword [esp + 0x50]
mov ecx, dword [0x972ec4]
mov edx, dword [0x972ec0]
push ebx
mov ebx, dword [0x972ef8]
push ebp
mov ebp, dword [esp + 0x50]
push esi
mov esi, dword [esp + 0x60]
push edi
mov al, byte [eax + ebp*4]
add al, 0xb
mov di, word [0x972edc]
mov byte [esp + 0x58], al
inc di
mov eax, dword [0x972eb0]
mov dword [esp + 0x34], eax
mov eax, dword [0x972eb4]
mov dword [esp + 0x18], eax
mov word [0x972edc], di
mov dword [esp + 0x28], 0x1597
movzx eax, word [ecx + eax*4]
or eax, dword [ebx + ebp*8 + 0x68]
mov dword [esp + 0x3c], eax
movzx eax, di
inc di
mov dword [esp + 0x10], eax
imul eax, edx, 0xc
mov word [0x972edc], di
mov eax, dword [eax + esi]
mov dword [esp + 0x20], eax
movzx eax, word [ecx + ebp*4]
mov dword [esp + 0x48], eax
mov eax, dword [0x972ecc]
movzx esi, word [ecx + eax*2]
mov eax, dword [0x972ed4]
mov dword [esp + 0x1c], eax
mov eax, ebp
imul eax, dword [0x972ef4]
movzx ecx, ax
mov eax, dword [0x972eec]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x6c]
movzx eax, byte [eax + 0x1918]
or eax, ebp
dec edx
mov dword [esp + 0x2c], eax
movzx eax, di
mov dword [esp + 0x4c], eax
mov eax, dword [0x972ee8]
mov dword [esp + 0x40], eax
mov eax, dword [0x972f00]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x34]
mov dword [0x972ec0], edx
mov edi, dword [esp + 0x2c]
movzx eax, byte [eax - 0x4fe]
movzx ecx, byte [eax + ecx]
mov eax, dword [esp + 0x18]
movzx edx, al
mov eax, ecx
sub eax, esi
mov dword [esp + 0x38], edx
imul eax, ecx
dec ebp
mov dword [ebx + edx*4], eax
mov ecx, dword [0x972eb0]
mov eax, dword [0x972eb8]
mov ebx, dword [esp + 0x18]
mov eax, dword [eax + ecx*4]
mov ecx, dword [esp + 0x54]
cdq
idiv dword [ecx + ebp*4 + 0x14]
mov eax, dword [esp + 0x68]
mov word [0x972edc], dx
movzx esi, byte [edi + eax + 6]
cmp esi, 0x1bae
jae 0x408c7b
mov edx, dword [esp + 0x64]
lea eax, [ebx + 1]
movzx eax, al
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x3c]
lea ecx, [edx + esi*4]
mov dword [esp + 0x30], ecx
lea eax, [eax + ebp*8]
add eax, 8
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x5c]
sub eax, edx
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x14]
mov edi, 0x72d
add dword [esp + 0x10], 2
dec ebp
movzx eax, ax
cdq
idiv ebp
sub dword [esp + 0x68], 8
mov eax, edx
cdq
idiv edi
mov edi, dword [esp + 0x10]
xor dword [ecx], eax
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x24]
movzx eax, word [eax + ebp*2]
cdq
idiv esi
movzx ecx, byte [ecx + 0x11d7]
cdq
idiv ecx
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x18]
xor dword [ecx + edx*4], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x54]
imul edx, dword [eax + 0x25c8], 0x15a9
mov eax, dword [0x972ee8]
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x972ef4]
movzx eax, word [edi + eax*4]
push eax
mov eax, dword [esp + 0x24]
push ecx
push dword [0x972ed4]
mov ecx, dword [esp + 0x24]
push edx
push esi
push dword [eax + ecx*4]
call fcn.00409f61
mov ecx, dword [esp + 0x7c]
xor edx, edx
mov edi, dword [esp + 0x40]
push edi
push ebp
mov dword [ecx + ebp*4], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x44]
push esi
movzx ecx, byte [eax + ecx]
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 0x4060]
div ecx
mov ecx, dword [esp + 0x78]
sub edx, dword [esp + 0x38]
movzx eax, dx
mov edx, 0x161b
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x8c]
sub edx, dword [eax]
mov eax, dword [0x972eb0]
imul ecx, dword [ecx + eax*4 + 0x18], 0x8c
inc edi
mov dword [esp + 0x4c], edi
push ecx
push esi
push edx
call fcn.00409f61
mov ecx, dword [0x972ef4]
add esp, 0x30
mov edx, dword [esp + 0x60]
mov edi, dword [esp + 0x2c]
mov dword [edx + ecx*4 + 4], eax
mov eax, dword [0x972ef0]
mov ecx, dword [esp + 0x30]
inc eax
mov edx, dword [esp + 0x44]
mov dword [0x972ef0], eax
cmp dword [edx + ecx], eax
jle 0x408c36
inc esi
add ecx, 4
mov dword [esp + 0x30], ecx
cmp esi, 0x1bae
jl 0x408b0e
jmp 0x408c77
mov eax, dword [esp + 0x34]
imul edx, dword [0x972eb0], 0xc
mov ecx, dword [esp + 0x20]
sub esi, dword [esp + 0x48]
movzx eax, byte [eax - 0x4fe]
mov ecx, dword [ecx + eax*4]
mov eax, dword [esp + 0x5c]
sub ecx, dword [edx + eax]
mov dword [edx + eax], ecx
mov eax, esi
movzx ecx, word [0x972edc]
xor edx, edx
dec dword [0x972eb0]
div ecx
mov word [0x972edc], dx
mov ecx, dword [esp + 0x54]
mov eax, dword [0x972ef4]
dec bl
mov ebp, dword [esp + 0x6c]
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x4c]
movzx eax, byte [eax + ebp]
cmp word [esi + edx*2], ax
jbe 0x408cbc
mov eax, dword [esp + 0x1c]
mov ecx, dword [ecx + edi*4]
mov edx, dword [esp + 0x3c]
xor ecx, edi
mov eax, dword [eax]
sub ecx, dword [edx + eax*4]
xor edx, edx
mov eax, ecx
movzx ecx, byte [esp + 0x58]
div dword [0x972ed4]
mov byte [ecx + ebp], al
movzx ecx, bl
imul eax, ecx, 0xc
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
mov eax, dword [eax + ecx]
add esp, 0x40
ret