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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x4c4
mov eax, dword [0x491040]
xor eax, esp
mov dword [esp + 0x4c0], eax
push ebx
push esi
mov esi, ecx
push edi
mov edi, edx
test esi, esi
jne 0x4056fd
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4c0]
xor ecx, esp
call fcn.004347ab
mov esp, ebp
pop ebp
ret
mov eax, dword [esi]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 4]
mov dword [esp + 0xc], eax
test edi, edi
je 0x405c48
mov ebx, edi
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x405717
sub ebx, ecx
je 0x405c48
mov eax, dword [esi + 0x5c]
test eax, eax
je 0x40573d
push eax
call fcn.00451a6e
add esp, 4
mov dword [esi + 0x5c], 0
sub esp, 8
mov edx, ebx
mov ecx, edi
call fcn.00405600
add esp, 8
mov dword [esi + 0x5c], eax
test eax, eax
je 0x405c48
cmp dword [esi + 0x14], 1
jne 0x405870
lea ecx, [esp + 0x10]
mov edx, eax
push ecx
push 0x100
push ecx
mov ecx, esi
call fcn.00404350
add esp, 0xc
test eax, eax
jne 0x40578b
mov dword [esi + 0x58], 0xffffffff
lea edi, [eax - 3]
jmp 0x405c1a
mov edx, dword [esp + 0x10]
mov dword [esi + 0x58], edx
test edx, edx
jns 0x4057a0
mov edi, 0xfffffffd
jmp 0x405c1a
mov ecx, dword [esi + 0x48]
test ecx, ecx
je 0x4057b6
cmp edx, dword [esi + 0x10]
jae 0x4057b6
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + edx*4]
add eax, dword [ecx]
jmp 0x4057b8
xor eax, eax
push ecx
lea ecx, [esp + 0x5c]
push ecx
push eax
mov ecx, esi
call fcn.00403fc0
add esp, 0xc
test eax, eax
jne 0x4057d5
lea edi, [eax - 3]
jmp 0x405c1a
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x84]
mov dword [esi + 0x68], eax
mov eax, dword [esp + 0x88]
mov dword [esi + 0x60], eax
mov eax, dword [esp + 0x78]
mov dword [esi + 0x70], eax
mov eax, dword [esp + 0x60]
mov dword [esi + 0x78], eax
mov eax, dword [esp + 0x98]
mov dword [esi + 0x6c], ecx
mov ecx, dword [esp + 0x8c]
mov dword [esi + 0xa0], eax
mov ax, word [esp + 0x6e]
mov dword [esi + 0x64], ecx
mov ecx, dword [esp + 0x64]
mov dword [esi + 0x7c], ecx
mov ecx, dword [esp + 0x9c]
mov word [esi + 0xa8], ax
mov eax, dword [esp + 0x94]
mov dword [esi + 0xa4], ecx
mov ecx, dword [esp + 0x74]
mov dword [esi + 0x4e008], eax
mov eax, dword [esp + 0x70]
mov dword [esi + 0x4e010], eax
mov dword [esi + 0x4e014], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4c0]
xor ecx, esp
call fcn.004347ab
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x10]
xorps xmm0, xmm0
mov edx, dword [esi + 0x50]
mov ecx, dword [esi + 4]
and edx, 0xf
mov dword [esi + 0x58], eax
mov eax, dword [esi]
mov dword [esi + 0x78], eax
mov dword [esi + 0xa0], eax
mov eax, edx
mov dword [esi + 0x68], 0
neg eax
mov dword [esi + 0x6c], 0
mov dword [esi + 0x60], 0
sbb eax, eax
mov dword [esi + 0x64], 0
and eax, 8
mov dword [esi + 0x70], 0
mov dword [esi + 0x7c], ecx
mov dword [esi + 0xa4], ecx
movups xmmword [esi + 0x80], xmm0
mov dword [esp + 0x1c], edx
movq qword [esi + 0x90], xmm0
mov dword [esi + 0x98], 0
mov word [esi + 0x9c], 0
mov word [esi + 0xa8], ax
mov dword [esi + 0x4e008], 0
mov edi, dword [esi + 0x20]
mov eax, edi
or eax, dword [esi + 0x24]
jne 0x405907
xor edi, edi
jmp 0x405912
mov eax, dword [esi]
lea ecx, [edi - 1]
and eax, ecx
sub edi, eax
and edi, ecx
cmp dword [esi + 0x48], 0
mov dword [esp + 0x10], edi
je 0x405c15
cmp dword [esi + 0x14], 2
jne 0x405c15
test dword [esi + 0x50], 0x400
je 0x40593d
mov edi, 0xfffffffb
jmp 0x405c1a
push dword [esi + 0x7c]
mov edx, edi
mov ecx, esi
push dword [esi + 0x78]
call fcn.00405000
add esp, 8
test eax, eax
jne 0x40595b
lea edi, [eax - 7]
jmp 0x405c1a
mov ecx, edi
mov eax, 0
add ecx, dword [esp + 0x20]
push 0
adc eax, dword [esp + 0x10]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], eax
call fcn.00451a06
add esp, 4
mov dword [esi + 0x4e010], eax
mov dword [esp + 0x20], eax
lea eax, [esp + 0x20]
mov dword [esi + 0x4e014], edx
mov dword [esp + 0x24], edx
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00450b63
add esp, 8
test eax, eax
je 0x4059c0
mov dword [esp + 0xc], 0
mov dword [esp + 0x20], 0
jmp 0x4059fd
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
shl ecx, 6
add ecx, dword [esp + 0x38]
sar eax, 1
shl ecx, 5
add ecx, eax
movzx eax, cx
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x44]
add eax, 0x301
shl ecx, 4
add eax, ecx
shl eax, 5
add eax, dword [esp + 0x40]
movzx eax, ax
mov dword [esp + 0xc], eax
cmp dword [esp + 0x18], 0
ja 0x405a16
cmp dword [esp + 0x14], 0xffffffff
jae 0x405a16
xor eax, eax
lea ecx, [esp + 0x4b4]
jmp 0x405a7d
lea edx, [esp + 0x28]
mov ecx, dword [edx]
mov eax, ecx
mov edx, dword [edx + 4]
shr eax, 8
mov byte [esp + 0x4b5], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x4b6], al
mov eax, edx
shr eax, 8
mov byte [esp + 0x4b9], al
mov eax, edx
mov byte [esp + 0x4b4], cl
shr ecx, 0x18
shr eax, 0x10
mov byte [esp + 0x4b8], dl
shr edx, 0x18
mov byte [esp + 0x4b7], cl
lea ecx, [esp + 0x4bc]
mov byte [esp + 0x4ba], al
mov eax, 8
mov byte [esp + 0x4bb], dl
push dword [esp + 0xc]
mov byte [esp + 0x4b6], al
lea edx, [esi + 0x80]
push dword [esp + 0x24]
shr eax, 8
mov byte [esp + 0x4bb], al
lea eax, [esp + 0x4b8]
sub ecx, eax
mov word [esp + 0x4b8], 1
movzx eax, word [esi + 0xa8]
push ecx
push eax
sub esp, 0x14
mov dword [esp + 0x38], ecx
push ecx
push ebx
call fcn.00404a90
add esp, 0x2c
test eax, eax
jne 0x405ad5
lea edi, [eax - 7]
jmp 0x405c1a
add edi, dword [esi + 0x78]
mov eax, dword [esi + 0x7c]
push 0x1e
push edx
adc eax, 0
mov dword [esi + 0xa0], edi
push eax
push edi
mov dword [esi + 0xa4], eax
mov edi, dword [esi + 0x3c]
mov ecx, edi
push dword [esi + 0x44]
call dword [0x4791e8]
call edi
add esp, 0x14
cmp eax, 0x1e
je 0x405b11
mov edi, 0xfffffff9
jmp 0x405c1a
mov eax, dword [esp + 0x10]
push ebx
push dword [esi + 0x5c]
add eax, 0x1e
add dword [esi + 0x78], eax
adc dword [esi + 0x7c], 0
push dword [esi + 0x7c]
mov edi, dword [esi + 0x3c]
mov ecx, edi
push dword [esi + 0x78]
push dword [esi + 0x44]
call dword [0x4791e8]
call edi
add esp, 0x14
cmp eax, ebx
je 0x405b4a
mov edi, 0xfffffff8
jmp 0x405c1a
add dword [esi + 0x78], ebx
lea eax, [esp + 0x4b0]
mov ebx, dword [esp + 0x14]
adc dword [esi + 0x7c], 0
mov edi, dword [esi + 0x3c]
mov ecx, edi
push ebx
push eax
push dword [esi + 0x7c]
push dword [esi + 0x78]
push dword [esi + 0x44]
call dword [0x4791e8]
call edi
add esp, 0x14
cmp eax, ebx
je 0x405b85
mov edi, 0xfffffff8
jmp 0x405c1a
add ebx, dword [esi + 0x78]
mov eax, 0
mov ecx, dword [esp + 0x1c]
adc eax, dword [esi + 0x7c]
mov dword [esi + 0x78], ebx
mov dword [esi + 0x7c], eax
test ecx, ecx
je 0x405859
mov edi, 0xa
mov dword [esi + 0xbc], eax
cmp ecx, edi
mov dword [esi + 0xb0], esi
mov eax, ecx
mov dword [esi + 0xb8], ebx
cmova eax, edi
mov dword [esi + 0xc0], 0
mov edi, 3
mov dword [esi + 0xc4], 0
cmp edi, ecx
lea edx, [esi + 0xb0]
sbb ecx, ecx
and ecx, 0xffffc000
add ecx, 0x4000
or ecx, dword [eax*4 + 0x482928]
push ecx
push edx
lea ecx, [esi + 0xc8]
call fcn.00403d00
add esp, 8
test eax, eax
je 0x405859
mov edi, 0xfffffff7
jmp 0x405c1a
mov edi, 0xfffffffc
mov eax, dword [esi + 0x5c]
test eax, eax
je 0x405c31
push eax
call fcn.00451a6e
add esp, 4
mov dword [esi + 0x5c], 0
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4c0]
xor ecx, esp
call fcn.004347ab
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x4cc]
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004347ab
mov esp, ebp
pop ebp
ret