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

Disassembly:
sub esp, 0x200
mov eax, dword [0x58e710]
xor eax, esp
mov dword [esp + 0x1fc], eax
push ebx
mov ebx, dword [esp + 0x208]
push ebp
mov ebp, dword [esp + 0x214]
push esi
mov esi, dword [esp + 0x214]
push edi
mov eax, esi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], 0
call fcn.004058b0
mov eax, dword [ebp]
mov dword [esi + 0x10], eax
mov edx, dword [ebp + 4]
mov dword [esi + 0x14], edx
mov eax, dword [ebp]
lea ecx, [esi + 0x10]
mov dword [esi + 0x78], eax
mov edx, dword [ebp + 4]
lea edi, [esi + 0x78]
mov dword [edi + 4], edx
mov edx, dword [ebp]
lea eax, [esi + 0xac]
mov dword [eax], edx
mov edx, dword [ebp + 4]
mov dword [esp + 0x24], eax
mov dword [eax + 4], edx
mov eax, dword [ebx]
cmp eax, 0xa
ja case.default.0x405bf2
jmp dword [eax*4 + 0x406314]
mov eax, dword [ebp]
mov ecx, dword [ebp + 4]
mov edx, dword [ebp + 8]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x34], ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0x38], edx
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
mov edx, dword [ebx + 4]
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x4c]
push ecx
push edx
call fcn.00405b70
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne case.0x405f16.3
lea ecx, [esp + 0x48]
lea eax, [esp + 0x30]
call fcn.004053d0
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x48]
push eax
push esi
push ecx
call fcn.00405930
mov ebx, dword [ebx + 8]
add esp, 0xc
test ebx, ebx
jne 0x405c23
jmp case.0x405f16.3
mov esi, ebx
mov dword [esp + 0x1c], esi
jmp 0x405c7c
mov esi, dword [esp + 0x1c]
mov eax, dword [esi + 4]
push ebp
lea edx, [esp + 0x4c]
push edx
push eax
call fcn.00405b70
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne case.0x405f16.3
mov edi, dword [esp + 0x14]
cmp esi, ebx
jne 0x405caf
mov ecx, 0x70
lea esi, [esp + 0x48]
rep movsd dword es:[edi], dword [esi]
jmp 0x405cbc
push ebp
lea eax, [esp + 0x4c]
call fcn.00405b00
add esp, 4
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 8]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x405c78
jmp case.0x405f16.3
mov edx, dword [ebx + 8]
mov esi, dword [ebx + 4]
mov ebx, dword [ebx + 0xc]
mov eax, edx
sub eax, esi
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 8]
push eax
mov eax, esi
test bl, 2
jne 0x405d21
push ecx
mov ebx, edx
call fcn.004054f0
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x1c]
add esp, 8
test edi, edi
jle 0x405d1a
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx + 4]
mov esi, dword [ebp + 8]
mov al, byte [edx]
lea ecx, [ebx + 0xac]
call fcn.004056b0
mov dword [ebx], edi
mov dword [ebx + 4], edi
jmp 0x405d9a
test bl, 4
mov ebx, edx
je 0x405d3b
call fcn.004121b0
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 8]
add esp, 4
imul ecx, eax
jmp 0x405d89
push ecx
call fcn.004054f0
mov ecx, dword [esp + 0x1c]
add esp, 8
cmp dword [esp + 0x1c], 0
mov dword [ecx + 0x24], 1
jle 0x405d85
mov edx, dword [ebp + 0x10]
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
mov edi, dword [ebp + 8]
mov ecx, dword [eax + 4]
push edx
mov edx, dword [eax + 8]
add esi, 0xac
call fcn.00405700
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
jne case.0x405f16.3
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov dword [eax], edx
mov dword [eax + 4], ecx
mov ebx, eax
mov edi, edx
cmp dword [ebx + 0x28], edi
jne case.0x405f16.3
mov eax, dword [esp + 0x14]
mov dword [eax + 0x20], 1
jmp case.0x405f16.3
cmp dword [ebx + 0x28], 0
jne case.0x405bf2.3
test byte [ebx + 4], 1
jne case.0x405bf2.3
xor eax, eax
mov dword [esp + 0x20], eax
mov ecx, eax
and ecx, 0x1f
mov edx, 1
shl edx, cl
mov ecx, eax
shr ecx, 5
and edx, dword [ebx + ecx*4 + 8]
je 0x405de4
test byte [ebx + 4], 1
je 0x405dea
jmp 0x405e04
test byte [ebx + 4], 1
je 0x405e04
mov ecx, dword [esp + 0x14]
mov esi, dword [ebp + 8]
add ecx, 0xac
call fcn.004056b0
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x14]
inc eax
cmp eax, 0x100
mov dword [esp + 0x20], eax
jl 0x405dc5
mov dword [esi], 1
mov dword [esi + 4], 1
jmp case.0x405f16.3
mov ebp, dword [ebp + 8]
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [esi], edx
mov dword [esi + 4], eax
jmp case.0x405f16.3
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
mov dword [esp + 0x20], ecx
cmp ecx, 1
jne 0x405ee4
cmp dword [ebx + 4], 0xc
mov edi, ecx
jne 0x405ee7
cmp dword [ebx + 8], 0
je 0x405ea1
xor ebx, ebx
lea esp, [esp]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x30]
push 0xc
push ebx
call ecx
add esp, 8
test eax, eax
jne 0x405e8a
mov ecx, dword [esp + 0x14]
mov esi, dword [ebp + 8]
mov al, bl
add ecx, 0xac
call fcn.004056b0
mov esi, dword [esp + 0x14]
inc ebx
cmp ebx, 0x100
jl 0x405e60
mov ecx, dword [esp + 0x20]
mov dword [esi], edi
mov dword [esi + 4], ecx
jmp case.0x405f16.3
xor ebx, ebx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x30]
push 0xc
push ebx
call eax
add esp, 8
test eax, eax
je 0x405ecd
mov ecx, dword [esp + 0x14]
mov esi, dword [ebp + 8]
mov al, bl
add ecx, 0xac
call fcn.004056b0
mov esi, dword [esp + 0x14]
inc ebx
cmp ebx, 0x100
jl 0x405ea3
mov ecx, dword [esp + 0x20]
mov dword [esi], edi
mov dword [esi + 4], ecx
jmp case.0x405f16.3
mov edi, dword [eax + 0xc]
mov ecx, dword [esp + 0x20]
mov dword [esi], edi
mov dword [esi + 4], ecx
jmp case.0x405f16.3
mov eax, dword [ebx + 4]
mov ecx, eax
cmp ecx, 0x10
jg 0x405f1d
je case.0x405f16.1
dec ecx
cmp ecx, 7
ja case.0x405f16.3
movzx ecx, byte [ecx + 0x406348]
jmp dword [ecx*4 + 0x406340]
cmp ecx, 0x20
je case.0x405f16.1
cmp ecx, 0x400
jne case.0x405f16.3
mov eax, dword [ebx + 8]
push ebp
lea edx, [esp + 0x4c]
push edx
push eax
call fcn.00405b70
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne case.0x405f16.3
cmp dword [esp + 0x70], eax
jle 0x405f5c
lea esi, [esp + 0x58]
jmp 0x405f6d
cmp dword [esp + 0xa4], 0
jle 0x405f78
lea esi, [esp + 0x8c]
mov ecx, 0xd
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
cmp dword [esp + 0x104], 0
mov dword [esi + 0x88], 0
jle case.0x405f16.3
mov edi, dword [esp + 0x24]
mov ecx, 0x45
lea esi, [esp + 0xf4]
rep movsd dword es:[edi], dword [esi]
jmp case.0x405f16.3
lea ecx, [esi + 8]
call fcn.00405420
jmp case.0x405f16.3
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + 0x68]
test ecx, ecx
jne 0x405fc1
lea ecx, [eax + 0x48]
test byte [ebx + 4], 0x80
mov dword [esp + 0x1c], ecx
je 0x405fdd
mov dword [esi], 0
mov dword [esi + 4], 0xffffffff
jmp case.0x405f16.3
mov edi, dword [ebx + 0x24]
test edi, edi
jne 0x405fe7
lea edi, [ebx + 0xc]
mov esi, dword [esp + 0x1c]
push eax
mov eax, dword [edi]
mov ecx, dword [esi + eax*4]
lea edx, [esp + 0x28]
push edx
push ecx
call fcn.00403060
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne case.0x405f16.3
mov edx, dword [ebp + 0x14]
mov ecx, dword [edi]
push edx
mov edx, dword [esi + ecx*4]
lea eax, [esp + 0x24]
push eax
push edx
call fcn.004032f0
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne case.0x405f16.3
mov esi, 1
cmp dword [ebx + 8], esi
jle 0x4060aa
mov eax, dword [ebp + 0x14]
mov edx, dword [edi + esi*4]
push eax
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [eax + edx*4]
push ecx
call fcn.00403060
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne case.0x405f16.3
mov edx, dword [ebp + 0x14]
mov ecx, dword [edi + esi*4]
push edx
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x2c]
push eax
mov eax, dword [edx + ecx*4]
push eax
call fcn.004032f0
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne case.0x405f16.3
mov eax, dword [esp + 0x2c]
cmp dword [esp + 0x24], eax
jbe 0x406096
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x20], eax
jae 0x4060a4
mov dword [esp + 0x20], eax
inc esi
cmp esi, dword [ebx + 8]
jl 0x406038
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov dword [eax], ecx
mov dword [eax + 4], edx
jmp case.0x405f16.3
test byte [ebx + 4], 0x80
jne 0x405fcb
mov eax, dword [ebx + 0x14]
mov ecx, dword [eax + 0x10]
mov edi, dword [ebp + 0xc]
push ebp
mov dword [ebp + 0xc], ecx
mov edx, dword [ebx + 0x14]
push esi
push edx
call fcn.00405b70
add esp, 0xc
mov dword [esp + 0x18], eax
mov dword [ebp + 0xc], edi
jmp case.0x405f16.3
mov ecx, dword [ebx + 8]
push ebp
lea eax, [esp + 0x4c]
push eax
push ecx
call fcn.00405b70
add esp, 0xc
mov dword [esp + 0x18], eax
test eax, eax
jne case.0x405f16.3
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x406159
cmp dword [ebx + 0x10], 0xffffffff
jne 0x406157
cmp dword [ebp + 4], eax
jne 0x4061dd
mov edx, dword [ebx + 8]
cmp dword [edx], 3
jne 0x4061dd
cmp dword [ebx + 0x14], eax
je 0x4061dd
test byte [ebp + 0xc], 4
je 0x40614b
or dword [esi + 8], 0x8000
jmp 0x4061dd
or dword [esi + 8], 0x4000
jmp 0x4061dd
test eax, eax
jle 0x4061dd
mov eax, dword [esp + 0x14]
mov ecx, 0x70
lea esi, [esp + 0x48]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
cmp dword [esp + 0x70], ecx
jle 0x4061c6
cmp dword [esp + 0x68], ecx
je 0x4061c6
mov esi, 2
cmp esi, dword [ebx + 0xc]
jg 0x4061c4
mov edi, 0x18
lea ecx, [ecx]
cmp dword [eax + 0x28], edi
jge 0x4061b8
mov eax, dword [ebp + 8]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x5c]
push ecx
add eax, 0x10
push eax
call fcn.00405450
mov eax, dword [esp + 0x20]
inc esi
add esp, 0xc
cmp esi, dword [ebx + 0xc]
jle 0x406190
cmp esi, dword [ebx + 0xc]
jge 0x4061c4
xor ecx, ecx
mov dword [eax + 0x20], ecx
jmp 0x4061c6
xor ecx, ecx
mov edx, dword [ebx + 0xc]
cmp edx, dword [ebx + 0x10]
je 0x4061d4
mov dword [eax + 0x20], ecx
mov dword [eax + 0x54], ecx
cmp dword [ebx + 0xc], 1
jle 0x4061dd
mov dword [eax + 0x54], ecx
mov ecx, dword [ebx + 0xc]
mov esi, dword [esp + 0x48]
call fcn.00401090
mov ecx, dword [ebx + 0x10]
mov edi, eax
cmp ecx, 0xffffffff
jne 0x406209
mov ecx, dword [esp + 0x14]
xor eax, eax
cmp eax, dword [esp + 0x4c]
mov dword [ecx], edi
sbb eax, eax
mov dword [ecx + 4], eax
jmp case.0x405f16.3
mov esi, dword [esp + 0x4c]
call fcn.00401090
mov ecx, dword [esp + 0x14]
mov dword [ecx], edi
mov dword [ecx + 4], eax
jmp case.0x405f16.3
mov eax, dword [ebx + 8]
sub eax, 1
je 0x406270
sub eax, 1
je 0x40624d
sub eax, 2
jne case.0x405f16.3
mov ecx, dword [ebx + 0x14]
push ebp
push esi
push ecx
call fcn.00405b70
add esp, 0xc
mov dword [esp + 0x18], eax
jmp case.0x405f16.3
mov edx, dword [ebx + 0x10]
mov edi, dword [ebp + 0xc]
push ebp
mov dword [ebp + 0xc], edx
mov eax, dword [ebx + 0x14]
push esi
push eax
call fcn.00405b70
add esp, 0xc
mov dword [esp + 0x18], eax
mov dword [ebp + 0xc], edi
jmp case.0x405f16.3
inc dword [ebx + 0x28]
cmp dword [ebx + 0x28], 5
jle 0x406296
mov eax, dword [ebx + 4]
xor edx, edx
or ecx, 0xffffffff
test al, 1
je 0x406288
mov edx, dword [ebx + 0x1c]
test al, 2
je 0x40628f
mov ecx, dword [ebx + 0x20]
mov dword [esi], edx
mov dword [esi + 4], ecx
jmp case.0x405f16.3
mov ecx, dword [ebx + 0x14]
push ebp
push esi
push ecx
call fcn.00405b70
add esp, 0xc
test dword [esi + 8], 0xc000
mov dword [esp + 0x18], eax
jne 0x4062c2
mov edx, dword [esi + 0xc]
and edx, 0xc000
neg edx
sbb edx, edx
neg edx
je case.0x405f16.3
mov ebx, dword [ebx + 0xc]
cmp ebx, 0x20
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 0x1c]
jge 0x4062dd
mov edx, 1
mov ecx, ebx
shl edx, cl
and eax, edx
jmp 0x4062e0
and eax, 1
test eax, eax
je case.0x405f16.3
and dword [esi + 8], 0xffff3fff
jmp case.0x405f16.3
mov dword [esp + 0x18], 0xfffffffa
mov ecx, dword [esp + 0x20c]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004f3f55
add esp, 0x200
ret