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

Disassembly:
sub esp, 0x38
mov ax, word [0x65cd38]
mov ecx, 0xffff
add ax, cx
mov ecx, dword [esp + 0x5c]
mov word [0x65cd38], ax
push ebx
mov ebx, dword [0x65cd3c]
push ebp
movzx ebp, ax
mov eax, ebp
imul eax, ebp
push esi
mov esi, dword [0x65cd4c]
push edi
mov edi, dword [0x65cd24]
mov dword [esp + 0x24], eax
movzx eax, byte [0x65cd2a]
mov eax, dword [ecx + eax*4 + 4]
mov dword [esp + 0x30], eax
mov al, byte [esi + 0x7cf8]
mov byte [esp + 0x13], al
mov eax, dword [0x65cd20]
movzx ecx, word [eax + 0x1026]
mov eax, dword [ebx + 0x4248]
cdq
idiv ecx
mov ecx, dword [esp + 0x64]
inc edi
mov dword [0x65cd24], edi
mov dword [esp + 0x28], edx
mov edx, dword [esp + 0x4c]
mov eax, dword [edx]
mov eax, dword [ecx + eax*4]
mov ecx, dword [0x65cd58]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
imul eax, dword [esi + ecx*8], 0x186b
inc ecx
mov dword [0x65cd58], ecx
mov esi, 0x777
mov dword [esp + 0x34], eax
mov eax, edi
add eax, eax
dec edi
mov eax, dword [ebx + eax*8 + 0xc]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x78]
mov dword [0x65cd24], edi
mov ebx, dword [esp + 0x14]
mov eax, dword [eax + edi*8]
mov edi, dword [esp + 0x54]
mov dword [esp + 0x2c], eax
mov eax, dword [edx]
movzx edx, byte [eax + edi]
imul edx, ecx
movzx ecx, byte [edi + eax*2 + 2]
movzx eax, word [0x65cd2c]
or ecx, eax
mov eax, 0x1395
mov dword [esp + 0x40], ecx
mov dword [esp + 0x38], edx
xor edx, edx
div ebp
mov eax, dword [0x65cd64]
mov dword [esp + 0x3c], eax
mov eax, 0x12b7
mov byte [esp + 0x54], dl
cdq
idiv dword [esp + 0x74]
mov ebp, dword [esp + 0x4c]
inc word [0x65cd38]
mov dword [esp + 0x44], eax
movzx eax, byte [esp + 0x13]
inc dword [ebp]
mov ebx, dword [ecx + ebx*8]
mov dword [esp + 0x20], eax
cmp ebx, eax
jle 0x407858
mov ebp, dword [esp + 0x1c]
mov ecx, dword [0x65cd60]
xor edx, edx
mov eax, dword [esp + 0x60]
inc ecx
mov dword [0x65cd60], ecx
mov dword [esp + 0x74], 0x260
mov eax, dword [eax + 0x6860]
div dword [0x65cd58]
mov eax, edx
xor edx, edx
div dword [esp + 0x74]
xor edx, edx
and eax, ecx
movzx ecx, word [ebp + ebx*2]
div ecx
mov ecx, dword [esp + 0x18]
inc esi
mov word [ebp + ebx*2], dx
mov al, byte [0x65cd2a]
mov edx, dword [esp + 0x64]
dec al
mov byte [0x65cd2a], al
movzx eax, al
mov ecx, dword [ecx + eax*4]
mov eax, dword [0x65cd54]
add ecx, dword [edx + eax*4]
inc eax
push ecx
push esi
mov dword [0x65cd54], eax
call fcn.00403caa
lea eax, [edi + ebx*4]
add byte [eax], bl
inc ebx
pop ecx
pop ecx
cmp ebx, dword [esp + 0x20]
jg 0x4077d7
mov ebp, dword [esp + 0x4c]
mov eax, dword [0x65cd44]
imul eax, dword [0x65cd60]
mov ecx, dword [esp + 0x24]
movzx edi, word [0x65cd50]
imul esi, dword [0x65cd58], 0x1d86
push 0x6e2
mov dword [0x65cd44], eax
mov ecx, dword [ecx]
mov eax, dword [esp + 0x6c]
push dword [0x5de2]
mov ebx, dword [eax + ecx*4]
movzx eax, byte [0x65cd2a]
mov ecx, dword [esp + 0x6c]
and edi, eax
mov eax, dword [ebp]
add eax, 4
add eax, eax
mov edx, dword [ecx + eax*8]
mov eax, dword [esp + 0x30]
and edx, 0x1c98
mov ecx, dword [esp + 0x34]
movzx eax, byte [eax + 0x87]
mov ecx, dword [ecx + 0x1864]
sub ecx, eax
mov eax, dword [0x65cd64]
and eax, 0xafa
push eax
mov eax, dword [esp + 0x6c]
push 0x173
push dword [esp + 0x24]
push ecx
push edx
push dword [eax + 0x5084]
push esi
push edi
push ebx
call fcn.004041ca
mov ecx, dword [ebp]
add esp, 0x2c
mov ebx, dword [esp + 0x78]
mov edx, dword [esp + 0x18]
mov edi, dword [esp + 0x34]
mov dword [ebx + ecx*4], eax
imul ecx, dword [0x65cd6c], 0x333
mov eax, dword [0x65cd54]
sub cx, word [edx + eax*4]
mov eax, 0x1605
sub cx, ax
mov eax, dword [esp + 0x30]
add word [0x65cd50], cx
mov eax, dword [eax - 0x15e3]
xor eax, dword [0x65cd34]
imul ecx, eax, 0x1a40
mov eax, dword [edi]
mov dword [eax*4 + 0xd5e], ecx
mov cl, byte [esp + 0x50]
sub cl, byte [esp + 0x54]
movzx eax, byte [0x65cd28]
mov edx, dword [0x65cd30]
movzx ecx, cl
inc edx
imul ecx, eax
mov eax, dword [esp + 0x38]
mov dword [0x65cd30], edx
xor cl, byte [eax + 0x1536]
mov eax, dword [esp + 0x3c]
add byte [eax + edx], cl
mov ecx, dword [0x65cd54]
mov eax, dword [esp + 0x6c]
mov edx, dword [ebp]
mov edi, dword [edi]
add edx, edx
mov esi, dword [0x65cd3c]
mov ecx, dword [eax + ecx*4 + 0x10]
mov eax, dword [esp + 0x40]
add ecx, dword [eax + edx*8]
or dword [esi + edi*4], ecx
mov eax, dword [esp + 0x44]
xor dword [0x65cd64], eax
mov al, byte [esp + 0x54]
dec al
pop edi
movzx eax, al
pop esi
pop ebp
mov eax, dword [ebx + eax*4]
pop ebx
add esp, 0x38
ret