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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
push ebx
push esi
push edi
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x144]
mov ecx, dword [ebp + 8]
xor eax, eax
mov al, byte [ecx + edx + 0x28]
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
mov edi, dword [ecx + eax*8 + 4]
mov eax, dword [ebp + 8]
mov edx, dword [eax + 0x140]
mov ecx, dword [ebp + 8]
movsx eax, word [ecx + 0x14]
imul edx, eax
lea edx, [edx + edx*4]
add edi, edx
test edi, edi
je 0x405b44
xor ecx, ecx
mov dword [ebp - 4], ecx
jmp 0x405b34
imul ebx, dword [ebp - 4], 0xac
add ebx, 0x410eac
xor eax, eax
mov al, byte [ebx + 0x66]
mov edx, dword [ebp + 8]
movsx ecx, word [edx + 0x20]
cmp eax, ecx
jl 0x405848
mov esi, 0x4124b8
mov dword [ebp - 8], 0x412430
mov eax, dword [ebp - 8]
xor edx, edx
mov dword [eax], edx
jmp 0x40588d
mov ecx, dword [ebp + 8]
mov esi, dword [ecx + 4]
xor eax, eax
mov al, byte [ebx + 0x66]
imul edx, eax, 0x154
add esi, edx
xor ecx, ecx
mov cl, byte [ebx]
cmp byte [esi + ecx + 0x44], 0x10
jb 0x40586f
mov dword [ebp - 8], 0x412430
jmp 0x405880
xor eax, eax
mov al, byte [ebx]
xor edx, edx
mov dl, byte [esi + eax + 0x44]
mov ecx, dword [esi + edx*4 + 4]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
jne 0x40588d
mov dword [ebp - 8], 0x412430
mov al, byte [edi + 3]
mov byte [ebp - 9], al
xor edx, edx
mov dl, byte [edi + 4]
sar edx, 4
mov byte [ebp - 0xa], dl
mov cl, byte [edi + 4]
and cl, 0xf
mov byte [ebp - 0xb], cl
xor eax, eax
mov dword [ebx + 0x18], eax
xor edx, edx
mov dword [ebx + 0x1c], edx
mov byte [ebx + 2], 0
test byte [esi + 0x14c], 1
je 0x405913
cmp byte [ebx + 0x3c], 0
jne 0x405913
push 2
lea ecx, [ebx + 0x38]
push ecx
lea eax, [ebx + 0x3c]
push eax
lea edx, [ebx + 0x30]
push edx
lea ecx, [ebx + 0x34]
push ecx
mov al, byte [esi + 0x146]
push eax
mov dl, byte [esi + 0x147]
push edx
mov cl, byte [esi + 0x148]
push ecx
lea eax, [esi + 0xa4]
push eax
xor edx, edx
mov dl, byte [esi + 0x144]
push edx
mov cl, byte [esi + 0x14c]
push ecx
lea eax, [ebx + 0x28]
push eax
lea edx, [ebx + 0x2c]
push edx
push ebx
call fcn.00404e40
add esp, 0x38
test byte [esi + 0x14d], 1
je 0x405971
cmp byte [ebx + 0x54], 0
jne 0x405971
push 4
lea ecx, [ebx + 0x50]
push ecx
lea eax, [ebx + 0x54]
push eax
lea edx, [ebx + 0x48]
push edx
lea ecx, [ebx + 0x4c]
push ecx
mov al, byte [esi + 0x149]
push eax
mov dl, byte [esi + 0x14a]
push edx
mov cl, byte [esi + 0x14b]
push ecx
lea eax, [esi + 0xf4]
push eax
xor edx, edx
mov dl, byte [esi + 0x145]
push edx
mov cl, byte [esi + 0x14d]
push ecx
lea eax, [ebx + 0x40]
push eax
lea edx, [ebx + 0x44]
push edx
push ebx
call fcn.00404e40
add esp, 0x38
cmp byte [ebx + 0x65], 0
je 0x405990
movzx ecx, word [esi + 0x152]
sub dword [ebx + 0x58], ecx
cmp dword [ebx + 0x58], 0
jge 0x40598c
xor eax, eax
mov dword [ebx + 0x58], eax
or byte [ebx + 2], 2
xor edx, edx
mov dl, byte [edi + 2]
sar edx, 4
add edx, 0xfffffffa
cmp edx, 9
ja case.0x4059a4.8
jmp dword [edx*4 + 0x4059ab]
xor ecx, ecx
mov cl, byte [edi + 2]
and ecx, 0xf
sub dword [ebx + 0x10], ecx
cmp dword [ebx + 0x10], 0
jge 0x4059e9
xor eax, eax
mov dword [ebx + 0x10], eax
or byte [ebx + 2], 2
jmp case.0x4059a4.8
xor edx, edx
mov dl, byte [edi + 2]
and edx, 0xf
add dword [ebx + 0x10], edx
cmp dword [ebx + 0x10], 0x40
jle 0x405a07
mov dword [ebx + 0x10], 0x40
or byte [ebx + 2], 2
jmp case.0x4059a4.8
xor ecx, ecx
mov cl, byte [edi + 2]
and ecx, 0xf
sub dword [ebx + 0x14], ecx
or byte [ebx + 2], 4
jmp case.0x4059a4.8
xor eax, eax
mov al, byte [edi + 2]
and eax, 0xf
add dword [ebx + 0x14], eax
or byte [ebx + 2], 4
jmp case.0x4059a4.8
push ebx
call fcn.00404ca8
pop ecx
xor edx, edx
mov dl, byte [ebp - 9]
cmp edx, 0xe
ja case.0x405a4a.0
mov dl, byte [edx + 0x405a51]
jmp dword [edx*4 + 0x405a60]
cmp byte [edi + 4], 0
jbe case.0x405a4a.0
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x134]
mov ecx, 3
cdq
idiv ecx
dec edx
je 0x405a9b
dec edx
je 0x405ab1
jmp 0x405ac5
mov eax, dword [ebp + 8]
test byte [eax + 0x22], 1
je 0x405ac5
xor edx, edx
mov dl, byte [ebp - 0xa]
shl edx, 6
mov dword [ebx + 0x1c], edx
jmp 0x405ac5
mov ecx, dword [ebp + 8]
test byte [ecx + 0x22], 1
je 0x405ac5
xor eax, eax
mov al, byte [ebp - 0xb]
shl eax, 6
mov dword [ebx + 0x1c], eax
or byte [ebx + 2], 1
jmp case.0x405a4a.0
xor edx, edx
mov dword [ebx + 0x1c], edx
xor ecx, ecx
mov cl, byte [ebx + 0x79]
shl ecx, 2
sub dword [ebx + 0xc], ecx
cmp dword [ebx + 0xc], 0x38
jge 0x405ae8
mov dword [ebx + 0xc], 0x38
or byte [ebx + 2], 1
jmp case.0x405a4a.0
xor eax, eax
mov dword [ebx + 0x1c], eax
xor edx, edx
mov dl, byte [ebx + 0x78]
shl edx, 2
add dword [ebx + 0xc], edx
or byte [ebx + 2], 1
jmp case.0x405a4a.0
xor ecx, ecx
mov dword [ebx + 0x1c], ecx
push ebx
call fcn.00404ca8
pop ecx
jmp case.0x405a4a.0
mov al, byte [ebp - 0xa]
push esi
push ebx
call fcn.00404d10
add esp, 8
push dword [ebp + 8]
push dword [ebp - 8]
push ebx
call fcn.004050aa
add esp, 0xc
inc dword [ebp - 4]
add edi, 5
mov edx, dword [ebp + 8]
movsx ecx, word [edx + 0x14]
cmp ecx, dword [ebp - 4]
jg 0x405816
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret