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

Disassembly:
push 0xffffffffffffffff
push 0x55f8e1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
mov al, byte [esp + 0x4c]
push ebx
push ebp
push esi
push edi
xor edi, edi
mov esi, ecx
mov byte [esp + 0x3c], al
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
push 6
push 0x59c104
lea ecx, [esp + 0x28]
mov dword [esp + 0x5c], edi
call fcn.005318a0
push 6
push 0x59c0fc
lea ecx, [esp + 0x24]
mov byte [esp + 0x5c], 1
call fcn.005318a0
push 6
push 0x59c0f4
lea ecx, [esp + 0x20]
mov byte [esp + 0x5c], 2
call fcn.005318a0
push edi
push edi
push ecx
mov byte [esp + 0x60], 3
mov ecx, esp
mov dword [esp + 0x40], esp
push 6
push 0x59b910
mov byte [esp + 0x28], 0
call fcn.005318a0
push ecx
mov byte [esp + 0x64], 4
mov ecx, esp
mov dword [esp + 0x40], esp
push 6
push 0x59c0ec
call fcn.005318a0
mov ecx, 0x5c6628
mov byte [esp + 0x64], 3
call fcn.00533b90
mov ecx, esi
call fcn.00407f80
mov ebx, dword [esp + 0x5c]
mov edi, 1
and ebx, 0xff
lea ecx, [ebx + ebx*2]
lea ebp, [ebx + ecx*4]
shl ebp, 2
mov cl, byte [ebp + 0x5721dc]
mov al, byte [ebp + 0x5721d2]
mov dx, word [ebp + 0x5721c8]
mov byte [esp + 0x28], cl
mov cl, byte [ebp + 0x5721f0]
mov byte [esp + 0x12], al
mov ax, word [ebp + 0x5721cc]
cmp cl, 1
mov word [esp + 0x2c], dx
mov dword [esp + 0x24], eax
jb 0x4068aa
movsx edx, di
mov ecx, esi
mov al, byte [edx + ebp + 0x5721f0]
push eax
call fcn.004072e0
test ax, ax
je 0x406a57
movzx cx, byte [ebp + 0x5721f0]
inc edi
cmp di, cx
jle 0x40687d
mov eax, dword [esp + 0x24]
test ax, ax
je 0x40690b
xor edx, edx
lea ecx, [esp + 0x18]
mov dl, ah
push edx
push 4
call fcn.00531ad0
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x18]
push eax
push 5
call fcn.00531ad0
push 0
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push 6
push 0x59b910
call fcn.005318a0
push ecx
lea edx, [esp + 0x28]
mov ecx, esp
mov dword [esp + 0x40], esp
push edx
mov byte [esp + 0x68], 5
call fcn.00531810
mov ecx, 0x5c6628
mov byte [esp + 0x64], 3
call fcn.00533b90
mov al, byte [esp + 0x12]
mov cl, byte [esp + 0x28]
cmp cl, al
jbe 0x40694d
mov eax, dword [esp + 0x28]
lea ecx, [ebx + ebx*2]
and eax, 0xff
push 2
lea edx, [ebx + ecx*4]
lea ecx, [eax + edx*2]
lea edx, [esi + 0xc]
push edx
mov ax, word [ecx*2 + 0x5721dc]
lea ecx, [esi + 0x78]
movsx eax, ax
lea eax, [eax + eax*4]
lea eax, [eax + eax*4 + 0x59bb70]
push eax
call fcn.0043cb50
mov eax, ebx
sub eax, 0
je 0x406959
sub eax, 2
jne 0x406963
mov cl, byte [ebp + 0x5721e0]
mov byte [esp + 0x14], cl
push 0
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x40], esp
push 6
push 0x59b910
call fcn.005318a0
push ecx
mov byte [esp + 0x64], 6
mov ecx, esp
mov dword [esp + 0x40], esp
push 6
push 0x59c0e4
call fcn.005318a0
mov ecx, 0x5c6628
mov byte [esp + 0x64], 3
call fcn.00533b90
mov eax, dword [esp + 0x5c]
lea edx, [esp + 0x3c]
push edx
push eax
mov ecx, esi
call fcn.00407090
mov ecx, dword [esp + 0x2c]
push ecx
push 5
lea ecx, [esp + 0x28]
call fcn.00531ad0
movzx dx, byte [esp + 0x12]
mov word [esp + 0x12], dx
push ecx
lea eax, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x38], esp
push eax
call fcn.00531810
mov ecx, dword [0x5c6634]
call fcn.005396d0
cmp word [esp + 0x12], 1
jl 0x406a38
movsx ecx, word [esp + 0x12]
lea edi, [ebp + 0x5721d3]
mov dword [esp + 0x28], ecx
mov dl, byte [edi]
lea ecx, [esp + 0x1c]
push edx
push 5
call fcn.00531ad0
push 1
push ecx
lea eax, [esp + 0x24]
mov ecx, esp
mov dword [esp + 0x3c], esp
push eax
call fcn.00531810
mov ecx, dword [0x5c6634]
call fcn.00539850
mov eax, dword [esp + 0x28]
inc edi
dec eax
mov dword [esp + 0x28], eax
jne 0x406a00
mov cl, byte [esp + 0x3c]
sub esp, 0x10
mov edi, esp
mov dword [esp + 0x44], esp
mov dword [esp + 0x44], edi
mov byte [edi], cl
mov ecx, dword [esp + 0x50]
test ecx, ecx
jne 0x406aae
xor eax, eax
jmp 0x406ab7
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00531940
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.00531940
lea ecx, [esp + 0x20]
mov byte [esp + 0x54], 0
call fcn.00531940
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
mov dword [esp + 0x54], 0xffffffff
mov edi, eax
je 0x406ce6
mov ecx, esi
call fcn.00531940
add esi, 4
cmp esi, edi
jne 0x406a9b
jmp 0x406ce2
mov eax, dword [esp + 0x54]
sub eax, ecx
sar eax, 2
test eax, eax
jge 0x406abd
xor eax, eax
lea edx, [eax*4]
push edx
call fcn.00556a96
mov dword [edi + 4], eax
mov ecx, dword [esp + 0x58]
mov edi, eax
mov eax, dword [esp + 0x54]
add esp, 4
cmp eax, ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], eax
je 0x406b1e
mov dword [esp + 0x48], edi
test edi, edi
mov byte [esp + 0x64], 7
je 0x406b03
push eax
mov ecx, edi
call fcn.00531810
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
add eax, 4
add edi, 4
cmp eax, ecx
mov byte [esp + 0x64], 3
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], eax
jne 0x406aea
mov eax, dword [esp + 0x44]
mov ecx, esi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
call fcn.00406eb0
test ax, ax
je 0x406c94
mov ecx, dword [0x5c6634]
call fcn.00539bf0
mov di, ax
inc edi
test di, di
je 0x4069cd
mov eax, ebx
sub eax, 0
je 0x406c20
sub eax, 2
je 0x406c20
sub eax, 8
je 0x406bb8
lea eax, [ebx + ebx*2]
push 2
movsx edx, di
lea ecx, [ebx + eax*4]
lea eax, [edx + ecx*2]
lea edx, [esi + 0xc]
push edx
mov cl, byte [eax*2 + 0x5721dc]
mov byte [esp + 0x2c], cl
lea ecx, [esi + 0x78]
mov eax, dword [esp + 0x2c]
and eax, 0xff
lea eax, [eax + eax*4]
lea eax, [eax + eax*4 + 0x59bb70]
push eax
call fcn.0043cb50
movzx cx, byte [ebp + 0x5721d2]
cmp di, cx
je 0x406cf7
jmp 0x4069cd
movsx eax, di
mov ecx, eax
sub ecx, 5
je 0x406c11
dec ecx
je 0x406d4e
mov dl, byte [eax*2 + 0x5723e4]
push 2
mov byte [esp + 0x28], dl
lea edx, [esi + 0xc]
mov eax, dword [esp + 0x28]
push edx
and eax, 0xff
lea ecx, [esi + 0x78]
lea edi, [eax + eax*4]
lea eax, [edi + edi*4 + 0x59bb70]
push eax
call fcn.0043cb50
lea eax, [esi + 0xc]
push 2
lea ecx, [edi + edi*4 + 0x59bb89]
push eax
push ecx
lea ecx, [esi + 0x78]
call fcn.0043cb50
jmp 0x4069cd
lea edx, [esi + 0xc]
xor eax, eax
mov al, byte [0x5723ee]
push 2
push edx
jmp 0x406c61
movsx eax, di
dec eax
je 0x406c79
dec eax
je 0x406c35
dec eax
je 0x406da5
jmp 0x4069cd
movzx cx, byte [esp + 0x14]
cmp cx, word [ebp + 0x5721e0]
jbe 0x4069cd
mov cl, byte [esp + 0x14]
dec cl
mov byte [esp + 0x14], cl
lea edx, [esi + 0xc]
mov eax, dword [esp + 0x14]
push 2
push edx
and eax, 0xff
lea eax, [eax + eax*4]
lea ecx, [esi + 0x78]
lea eax, [eax + eax*4 + 0x59bb70]
push eax
call fcn.0043cb50
jmp 0x4069cd
movzx cx, byte [esp + 0x14]
cmp cx, word [ebp + 0x5721de]
jae 0x4069cd
mov cl, byte [esp + 0x14]
inc cl
jmp 0x406c4e
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00531940
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.00531940
lea ecx, [esp + 0x20]
mov byte [esp + 0x54], 0
call fcn.00531940
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
mov dword [esp + 0x54], 0xffffffff
mov edi, eax
je 0x406ce6
mov ecx, esi
call fcn.00531940
add esi, 4
cmp esi, edi
jne 0x406cd4
mov esi, dword [esp + 0x40]
push esi
call fcn.00556360
add esp, 4
xor ax, ax
jmp 0x406e8f
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00531940
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.00531940
lea ecx, [esp + 0x20]
mov byte [esp + 0x54], 0
call fcn.00531940
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
mov dword [esp + 0x54], 0xffffffff
mov edi, eax
je 0x406e82
mov ecx, esi
call fcn.00531940
add esi, 4
cmp esi, edi
jne 0x406d3b
jmp 0x406e7e
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00531940
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.00531940
lea ecx, [esp + 0x20]
mov byte [esp + 0x54], 0
call fcn.00531940
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
mov dword [esp + 0x54], 0xffffffff
mov edi, eax
je 0x406e82
mov ecx, esi
call fcn.00531940
add esi, 4
cmp esi, edi
jne 0x406d92
jmp 0x406e7e
lea ecx, [ebx + ebx*2]
movsx eax, di
lea edx, [ebx + ecx*4]
lea ecx, [eax + edx*2]
mov al, byte [ecx*2 + 0x5721dc]
cmp al, 0xff
mov byte [esp + 0x24], al
je 0x406de2
mov eax, dword [esp + 0x24]
lea edx, [esi + 0xc]
and eax, 0xff
push 2
push edx
lea ecx, [esi + 0x78]
lea eax, [eax + eax*4]
lea eax, [eax + eax*4 + 0x59bb70]
push eax
call fcn.0043cb50
mov al, byte [esp + 0x5c]
cmp al, 0x25
je 0x406df2
cmp al, 0x26
je 0x406df2
cmp al, 0x27
jne 0x406e30
push 0
push 1
push ecx
mov ecx, esp
mov dword [esp + 0x68], esp
push 6
push 0x59b910
call fcn.005318a0
push ecx
mov byte [esp + 0x64], 8
mov ecx, esp
mov dword [esp + 0x48], esp
push 6
push 0x59c0dc
call fcn.005318a0
mov ecx, 0x5c6628
mov byte [esp + 0x64], 3
call fcn.00533b90
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call fcn.00531940
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 1
call fcn.00531940
lea ecx, [esp + 0x20]
mov byte [esp + 0x54], 0
call fcn.00531940
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x40]
cmp esi, eax
mov dword [esp + 0x54], 0xffffffff
mov edi, eax
je 0x406e82
mov ecx, esi
call fcn.00531940
add esi, 4
cmp esi, edi
jne 0x406e70
mov esi, dword [esp + 0x40]
push esi
call fcn.00556360
add esp, 4
mov ax, 1
mov ecx, dword [esp + 0x4c]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x48
ret 4