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

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x10
mov eax, dword [esp + 0x3c]
mov esi, 0xfffffffa
test eax, eax
je 0x406482
cmp dword [esp + 0x40], 0x38
jne 0x406482
cmp byte [eax], 0x31
jne 0x406482
mov ebp, dword [esp + 0x24]
mov esi, 0xfffffffe
test ebp, ebp
je 0x406482
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x34]
mov dword [esp + 4], eax
mov ebx, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
mov edx, dword [esp + 0x28]
mov dword [ebp + 0x18], 0
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x406298
cmp dword [ebp + 0x24], 0
je 0x4062b1
cmp edx, 0xffffffff
mov ecx, 6
cmovne ecx, edx
mov dword [esp + 8], ecx
test ebx, ebx
js 0x4062ba
cmp ebx, 0x10
jb 0x4062d3
add ebx, 0xfffffff0
mov ecx, 2
mov dl, 1
cmp edi, 4
jbe 0x4062e3
jmp 0x406482
mov dword [ebp + 0x20], 0x4b30d0
mov eax, 0x4b30d0
mov dword [ebp + 0x28], 0
cmp dword [ebp + 0x24], 0
jne 0x40626c
mov dword [ebp + 0x24], 0x4b30f0
jmp 0x40626c
cmp ebx, 0xfffffff1
jb 0x406482
neg ebx
xor ecx, ecx
mov dl, 1
cmp edi, 4
jbe 0x4062e3
jmp 0x406482
mov ecx, 1
xor edx, edx
cmp edi, 4
ja 0x406482
cmp dword [esp + 8], 9
ja 0x406482
cmp dword [esp], 8
jne 0x406482
mov dword [esp], ecx
mov ecx, dword [esp + 4]
add ecx, 0xfffffff6
cmp ecx, 0xfffffff7
jb 0x406482
cmp ebx, 8
jb 0x406482
cmp ebx, 0xf
ja 0x406482
cmp ebx, 8
sete cl
test cl, dl
jne 0x406482
mov dword [esp + 0xc], edi
push 0x16c4
push 1
push dword [ebp + 0x28]
call eax
add esp, 0xc
mov esi, 0xfffffffc
test eax, eax
je 0x406482
mov edi, eax
cmp ebx, 8
mov ecx, 9
cmovne ecx, ebx
mov eax, 1
shl eax, cl
mov dword [ebp + 0x1c], edi
mov dword [edi], ebp
mov dword [edi + 4], 0x2a
mov edx, dword [esp]
mov dword [edi + 0x18], edx
mov dword [edi + 0x1c], 0
mov dword [edi + 0x30], ecx
mov dword [edi + 0x2c], eax
lea ecx, [eax - 1]
mov dword [edi + 0x34], ecx
mov ebx, dword [esp + 4]
lea ecx, [ebx + 7]
mov dword [edi + 0x50], ecx
mov edx, 0x80
mov ecx, ebx
shl edx, cl
mov dword [edi + 0x4c], edx
dec edx
mov dword [edi + 0x54], edx
add cl, 9
movzx ecx, cl
imul ecx, ecx, 0xab
shr ecx, 9
mov dword [edi + 0x58], ecx
push 2
push eax
push dword [ebp + 0x28]
call dword [ebp + 0x20]
add esp, 0xc
mov dword [edi + 0x38], eax
push 2
push dword [edi + 0x2c]
push dword [ebp + 0x28]
call dword [ebp + 0x20]
add esp, 0xc
mov dword [edi + 0x40], eax
push 2
push dword [edi + 0x4c]
push dword [ebp + 0x28]
call dword [ebp + 0x20]
add esp, 0xc
mov dword [edi + 0x44], eax
mov dword [edi + 0x16c0], 0
mov eax, 0x40
mov ecx, ebx
shl eax, cl
mov dword [edi + 0x169c], eax
push 4
push eax
push dword [ebp + 0x28]
call dword [ebp + 0x20]
add esp, 0xc
mov dword [edi + 8], eax
mov ecx, dword [edi + 0x169c]
lea edx, [ecx*4]
mov dword [edi + 0xc], edx
cmp dword [edi + 0x38], 0
je 0x406467
cmp dword [edi + 0x40], 0
je 0x406467
cmp dword [edi + 0x44], 0
je 0x406467
test eax, eax
je 0x406467
add eax, ecx
mov dword [edi + 0x1698], eax
lea eax, [ecx + ecx*2]
add eax, 0xfffffffd
mov dword [edi + 0x16a4], eax
mov eax, dword [esp + 8]
mov dword [edi + 0x84], eax
mov eax, dword [esp + 0xc]
mov dword [edi + 0x88], eax
mov byte [edi + 0x24], 8
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
jmp 0x406570
mov dword [edi + 4], 0x29a
mov eax, dword [0x6b19c0]
mov eax, dword [eax + 0x18]
mov dword [ebp + 0x18], eax
push ebp
call fcn.00406490
add esp, 4
mov eax, esi
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
push edi
push esi
mov edi, dword [esp + 0xc]
push edi
call fcn.00406ce0
add esp, 4
mov esi, eax
test eax, eax
je 0x40658a
mov eax, esi
pop esi
pop edi
ret
mov edi, dword [edi + 0x1c]
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x44]
add eax, eax
mov dword [edi + 0x3c], eax
mov eax, dword [edi + 0x4c]
mov word [ecx + eax*2 - 2], 0
lea eax, [eax*2 - 2]
push eax
push 0
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
mov eax, dword [edi + 0x84]
shl eax, 2
movzx ecx, word [eax + eax*2 + 0x6b1942]
mov dword [edi + 0x80], ecx
movzx ecx, word [eax + eax*2 + 0x6b1940]
mov dword [edi + 0x8c], ecx
movzx ecx, word [eax + eax*2 + 0x6b1944]
mov dword [edi + 0x90], ecx
movzx eax, word [eax + eax*2 + 0x6b1946]
mov dword [edi + 0x7c], eax
mov dword [edi + 0x6c], 0
mov dword [edi + 0x5c], 0
mov dword [edi + 0x74], 0
mov dword [edi + 0x16b4], 0
mov dword [edi + 0x78], 2
mov dword [edi + 0x60], 2
mov dword [edi + 0x68], 0
mov dword [edi + 0x48], 0
mov eax, esi
pop esi
pop edi
ret