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

Disassembly:
sub esp, 0x38
push ebx
push ebp
mov ebp, dword [esp + 0x44]
xor edx, edx
push esi
movzx esi, byte [0x4a4df9]
mov ecx, dword [0x4a4e24]
movzx eax, word [ebp]
mov dword [esp + 0x18], esi
push edi
movzx edi, word [0x4a4e34]
movzx eax, word [ebp + eax*2]
add edi, 0x18cf
mov dword [esp + 0x2c], eax
sub ebp, 2
mov eax, 0xb8d
mov dword [esp + 0x4c], ebp
div esi
movzx eax, word [ecx + 0x22f6]
mov dword [esp + 0x24], eax
mov eax, dword [0x4a4e10]
inc eax
mov dword [esp + 0x40], edx
mov dword [0x4a4e10], eax
mov dword [esp + 0x3c], eax
movzx eax, word [ebp + esi*2]
inc dword [0x4a4e18]
mov esi, dword [esp + 0x5c]
mov dword [esp + 0x34], eax
movzx eax, word [ebp]
mov dword [esp + 0x20], 0x88
mov dword [esp + 0x14], edi
movzx edx, byte [esi + eax*2]
movzx eax, byte [0x4a4dfa]
and edx, eax
mov eax, dword [0x4a4e54]
dec eax
mov dword [esp + 0x18], edx
mov edx, dword [0x4a4e3c]
mov ebx, dword [esp + 0x18]
dec edx
mov dword [esp + 0x38], eax
mov dword [0x4a4e54], eax
mov eax, dword [0x4a4e4c]
mov dword [0x4a4e3c], edx
movzx eax, word [eax + 0x38e0]
mov dword [esp + 0x44], eax
mov al, byte [0x4a4e20]
xor al, byte [0x4a4df9]
mov byte [esp + 0x13], al
movzx eax, word [ebp]
movzx eax, word [ecx + eax*2]
sub dword [esp + 0x1c], eax
movzx eax, word [ebx]
mov ecx, dword [esp + 0x60]
imul eax, eax, 6
movzx eax, word [eax + ecx]
mov dword [esp + 0x28], eax
cmp eax, 0x1352
je 0x40e5a3
lea ecx, [ebp + 0x10]
mov ebp, edi
lea ecx, [ecx + eax*2]
mov dword [esp + 0x30], ecx
mov ax, word [ebp + 0x341c]
xor ax, word [ecx]
mov ecx, dword [0x4a4e50]
and ax, cx
mov edi, dword [0x4a4e40]
mov word [0x4a4e04], ax
mov eax, 0x198a
sub eax, edi
imul eax, dword [0x4a4e18]
and dword [esp + 0x20], eax
movzx eax, word [ebx]
movzx eax, byte [eax + esi + 4]
sub ax, word [esp + 0x28]
movzx esi, ax
mov eax, edx
mov edx, dword [esp + 0x64]
add eax, eax
mov edx, dword [edx + eax*8]
mov eax, dword [esp + 0x5c]
xor edx, 0x51
dec dword [0x4a4e3c]
inc edi
mov ecx, dword [ebp + ecx*4]
inc dword [esp + 0x24]
mov dword [0x4a4e40], edi
movzx eax, byte [eax + 0x9b5]
imul eax, dword [esp + 0x24]
push eax
push edi
push ecx
push edx
push 0x1c56
push esi
call fcn.0040d546
mov ecx, dword [0x4a4e50]
add esp, 0x18
shl ecx, 4
mov dword [ecx + 0x19f7], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
inc eax
add ecx, 2
mov dword [esp + 0x28], eax
mov dword [esp + 0x30], ecx
cmp eax, 0x1352
je 0x40e59b
mov edx, dword [0x4a4e3c]
mov esi, dword [esp + 0x5c]
jmp 0x40e4dc
mov ebp, dword [esp + 0x4c]
mov edi, dword [esp + 0x14]
mov cx, word [0x4a4e04]
mov eax, 0x4ee
cmp cx, ax
jbe 0x40e6b8
movzx eax, word [ebp]
imul edx, eax, 3
movzx eax, cx
mov ecx, dword [esp + 0x58]
imul eax, eax, 0xc
mov esi, dword [esp + 0x1c]
mov cl, byte [eax + ecx]
mov eax, dword [esp + 0x64]
sub cl, 0x4a
movzx ecx, cl
movzx eax, byte [eax + 0x69c0]
imul ecx, eax
movzx eax, byte [edx + esi]
movzx ecx, cl
imul ecx, eax
mov eax, dword [esp + 0x54]
mov byte [edx + esi], cl
imul ecx, dword [0x4a4e14], 3
movzx esi, word [ebp]
sub ebp, 2
mov dword [esp + 0x4c], ebp
movzx eax, byte [ecx + eax]
cdq
idiv dword [0x4a4e38]
movzx eax, word [ebx]
mov ecx, dword [esp + 0x3c]
add eax, eax
imul edx, dword [ecx + eax*8]
movzx eax, word [0x4a4e04]
mov ecx, dword [esp + 0x2c]
movzx eax, word [ecx + eax*2]
sub edx, eax
mov eax, 0xffff
sub edx, dword [edi + esi*4]
mov dword [edi + esi*4], edx
add word [0x4a4e04], ax
inc dword [0x4a4e38]
mov eax, dword [esp + 0x18]
movzx ebx, byte [0x2b55]
movzx ecx, word [eax]
mov eax, dword [esp + 0x68]
movzx edi, byte [ecx + eax]
mov eax, dword [0x4a4e1c]
add edi, dword [eax + 0x5acc]
mov eax, dword [esp + 0x1c]
movzx esi, byte [eax + 0x69c]
lea eax, [ecx + 0x8f7]
mov ecx, dword [esp + 0x5c]
imul eax, eax, 3
movzx edx, byte [eax]
mov eax, dword [0x4a4e5c]
and edx, dword [0x4a4e44]
movzx ecx, byte [ecx + eax*4]
movzx eax, word [0x4a4e34]
sub ecx, 0x67e
push eax
push ecx
push edx
push esi
push edi
push ebx
call fcn.0040d546
mov ebx, dword [esp + 0x30]
add esp, 0x18
mov word [0x4a4e2c], ax
mov edi, dword [esp + 0x5c]
mov eax, 0xffff
add word [ebp], ax
movzx eax, word [ebp]
movzx edx, word [ebx]
mov esi, dword [esp + 0x14]
mov cl, byte [eax + edi]
mov eax, dword [0x4a4df4]
cmp cl, byte [edx + eax]
jae 0x40e6f5
mov eax, dword [0x4a4e48]
movzx ecx, word [eax + edx*2]
mov eax, dword [0x4a4e5c]
cmp dword [esi + eax*4 + 0x70], ecx
jbe 0x40e7d9
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x2c]
mov cl, byte [ebx + eax*2]
movzx eax, word [0x4a4e34]
and cl, 0xf7
imul eax, eax, 6
sub cl, byte [eax + edi + 6]
sub cl, byte [esp + 0x20]
mov eax, dword [esp + 0x1c]
or byte [edx + eax], cl
mov eax, 0xffff
add word [ebp], ax
mov ecx, edi
movzx edx, word [ebx]
sub ebx, 4
movzx eax, word [ebp]
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x18], ebx
movzx ecx, word [ecx + edx*2]
sub ecx, dword [esi + edx*4]
mov esi, dword [esp + 0x58]
xor ecx, dword [esi + eax*4]
add dword [edx*4 + 0x1aee], ecx
movzx edx, word [ebp]
mov eax, dword [esp + 0x60]
movzx eax, word [eax + edx*2]
cmp eax, dword [esp + 0x34]
ja 0x40e7d9
movzx esi, word [ebx]
mov ebp, dword [esp + 0x58]
mov ecx, esi
movzx eax, byte [edi + ecx*2]
cmp eax, dword [ebp + ecx*4]
mov ebp, dword [esp + 0x4c]
ja 0x40e7d9
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x64]
movzx eax, byte [edx + eax]
cmp dword [ecx + edx*4 + 0x1c], eax
jb 0x40e7d9
movzx ecx, byte [esp + 0x13]
lea eax, [esi - 1]
mov word [ebx], ax
movzx eax, ax
movzx eax, byte [eax + edi + 0x1e]
imul eax, ecx
cdq
idiv dword [0x4a4e5c]
mov dword [0x4a4e5c], eax
movzx eax, word [0x4a4e0c]
cdq
idiv dword [0x4a4e20]
push eax
mov eax, dword [esp + 0x38]
dec al
movzx eax, al
push eax
call fcn.0040cb30
mov edx, dword [esp + 0x6c]
pop ecx
pop ecx
movzx ecx, word [0x4a4e04]
mov dword [edx + ecx*4], eax
movzx ebx, word [ebp]
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x4c]
movzx ebp, word [eax + ebx*2 + 0xe]
mov eax, dword [0x4a4e5c]
movzx eax, word [ecx + eax*8]
movzx ecx, word [0x7ad6]
or ebp, eax
movzx eax, word [0x4a4e04]
movzx eax, byte [eax + 0x1ae3]
imul eax, ecx
mov ecx, dword [esp + 0x38]
movzx esi, byte [ebx + ecx]
mov ecx, dword [esp + 0x14]
movzx edi, ax
mov eax, dword [esp + 0x18]
movzx eax, word [eax]
imul eax, eax, 0xc
or esi, dword [eax + ecx + 0x1c]
mov eax, dword [0x4a4e50]
mov ecx, dword [esp + 0x40]
movzx edx, byte [eax + ecx]
mov eax, dword [esp + 0x4c]
movzx ecx, word [eax + ebx*2]
mov eax, dword [esp + 0x44]
movzx eax, word [eax + 0x3dce]
or ecx, eax
movzx eax, byte [esp + 0x13]
push ecx
push edx
push 0x6a
push esi
push eax
push edi
call fcn.0040d546
mov ecx, dword [esp + 0x78]
add esp, 0x18
mov dword [0x4a4e10], eax
mov eax, dword [esp + 0x4c]
mov esi, dword [0x4a4e18]
pop edi
movzx eax, word [eax]
movzx ecx, word [ecx + eax*2]
mov eax, 0x1289
sub eax, ecx
cdq
idiv ebp
mov edx, dword [esp + 0x10]
imul eax, dword [edx + esi*4]
mov dword [edx + esi*4], eax
mov ecx, dword [0x4a4e18]
mov eax, dword [0x4a4e28]
pop esi
pop ebp
pop ebx
mov eax, dword [eax + ecx*4 + 0x14]
or dword [0x4a4e10], eax
mov eax, dword [esp + 8]
xor dword [0x4a4e54], 0xdef
mov ecx, dword [0x4a4e40]
movzx eax, word [eax]
mov eax, dword [edx + eax*4]
imul eax, ecx
dec ecx
mov dword [0x4a4e40], ecx
add esp, 0x38
ret