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

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
mov esi, dword [esp + 0x70]
mov ebp, esi
push edi
mov edi, dword [esp + 0x70]
mov ebx, edi
sub ebx, dword [esp + 0x50]
mov eax, edi
mov dword [esp + 0x2c], ecx
sbb ebp, dword [esp + 0x54]
sub eax, dword [esp + 0x60]
mov dword [esp + 0x30], eax
mov eax, esi
sbb eax, dword [esp + 0x64]
xor ecx, ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x78]
neg eax
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
xor edx, edx
add eax, ecx
mov dword [esp + 0x34], ecx
bts ecx, eax
cmp eax, 0x20
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
mov dword [esp + 0x3c], ecx
mov eax, edi
cmovae edx, ecx
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x38], edx
mov edx, esi
call fcn.00436400
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x38]
add ecx, 0xffffffff
mov dword [esp + 0x40], ecx
adc edx, 0xffffffff
mov dword [esp + 0x28], eax
mov dword [esp + 0x44], edx
and ecx, edi
and edx, esi
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], edx
mov ecx, eax
lea edx, [esp + 0x70]
call fcn.00407f31
mov edi, eax
test edi, edi
jle 0x40818c
mov esi, dword [esp + 0x70]
mov eax, dword [esp + 0x1c]
xor edx, edx
mov ecx, dword [eax]
mov eax, dword [esp + 0x28]
div esi
mov edx, dword [esp + 0x2c]
add al, 0x30
mov byte [ecx + edx], al
lea eax, [ecx + 1]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x60], eax
mov ecx, dword [esp + 0x18]
mov dword [edx], eax
xor edx, edx
mov eax, dword [esp + 0x28]
div esi
dec edi
mov eax, edx
mov dword [esp + 0x70], edi
xor edx, edx
mov dword [esp + 0x28], eax
call fcn.00436340
mov edi, eax
mov eax, edx
add edi, dword [esp + 0x20]
adc eax, dword [esp + 0x14]
mov dword [esp + 0x50], eax
cmp eax, ebp
jb 0x408265
ja 0x408179
cmp edi, ebx
jbe 0x408265
push 0xa
mov eax, esi
mov edi, dword [esp + 0x74]
xor edx, edx
pop ecx
div ecx
mov esi, eax
test edi, edi
jg 0x408115
mov eax, dword [esp + 0x14]
push 0xa
pop esi
mul esi
mov ecx, eax
mov eax, dword [esp + 0x20]
mul esi
mov edi, eax
add ecx, edx
mov eax, dword [esp + 0x1c]
mov edx, ecx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x18]
mov esi, dword [eax]
mov eax, edi
call fcn.00436400
mov ecx, dword [esp + 0x2c]
add al, 0x30
mov edx, dword [esp + 0x1c]
push 0xa
and edi, dword [esp + 0x44]
mov byte [esi + ecx], al
lea eax, [esi + 1]
mov dword [edx], eax
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x18]
and eax, dword [esp + 0x48]
mov dword [esp + 0x18], eax
mov dword [esp + 0x54], eax
mov eax, ebp
pop esi
mul esi
inc dword [esp + 0x34]
mov ebp, eax
mov dword [esp + 0x20], edi
mov eax, ebx
mul esi
push 0xa
mov ebx, eax
add ebp, edx
mov eax, dword [esp + 0x28]
mul esi
pop edx
mov esi, eax
mov eax, dword [esp + 0x30]
mul edx
add esi, edx
mov edx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x24], esi
mov dword [esp + 0x30], edx
cmp eax, ebp
ja 0x408190
jb 0x40822e
cmp edi, ebx
ja 0x408190
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x34]
sub dword [eax], esi
mov eax, dword [esp + 0x3c]
push dword [esp + 0x38]
mov esi, dword [esp + 0x28]
push eax
push dword [esp + 0x58]
push edi
push ebp
push ebx
push esi
push edx
mov edx, dword [esp + 0x80]
call fcn.00407faa
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
mov eax, dword [esp + 0x4c]
xor edx, edx
mov ecx, dword [esp + 0x70]
add dword [eax], ecx
mov eax, esi
mov ecx, dword [esp + 0x18]
call fcn.00436340
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x30]
jmp 0x40823c