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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebx]
push esi
mov esi, dword [ebx + 8]
push edi
xor edi, edi
mov dword [ebp - 0x14], eax
add esi, 0x28
push 8
pop eax
mov ecx, esi
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 0x10], edi
call fcn.0042057a
and dword [ebx + 0x14], edi
cmp dword [ebx + 0x5c], 7
jne 0x420652
mov eax, dword [ebp - 0x14]
mov byte [eax + 0x40], 1
xor eax, eax
inc eax
jmp 0x420929
mov eax, dword [ebx + 0x64]
mov edx, dword [ebx + 0x1c]
and eax, 3
mov dword [ebp - 8], edx
mov dword [ebp - 0x18], eax
cmp eax, 1
jne 0x4206a3
mov eax, dword [ebx + 8]
add eax, 0x168
test byte [eax + 0x1c], 0x10
mov dword [ebp - 0x10], eax
je 0x420688
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 4]
shr ecx, 2
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], eax
mov edi, eax
xor eax, eax
cmp dword [ebp - 4], eax
jle 0x4206a3
mov ecx, dword [edi + eax*4]
add edx, dword [ecx + 4]
inc eax
cmp eax, dword [ebp - 4]
jl 0x42068f
mov dword [ebp - 8], edx
jmp 0x4206a3
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 0x58]
lea ecx, [eax + 1]
mov dword [ebx + 0x58], ecx
cmp eax, edx
jge 0x4206fe
cmp dword [ebp - 0x18], 2
jne 0x4206c4
mov edx, dword [ebx + 4]
mov ecx, eax
imul ecx, ecx, 0x14
cmp byte [ecx + edx], 0x96
jne 0x4206a0
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + 0xe8]
test edx, edx
je 0x420705
push 9
pop eax
xor esi, esi
push str.unknown_error
mov dword [ebx + 0x5c], eax
inc esi
call fcn.0044e84d
add esp, 4
push eax
push 0x46b7f8
push ecx
lea edi, [ebx + 0x38]
call fcn.0040c632
add esp, 0xc
jmp 0x420927
push 0x65
jmp 0x420922
mov ecx, dword [ebx + 0x1c]
cmp eax, ecx
jge 0x420719
mov edi, eax
imul edi, edi, 0x14
add edi, dword [ebx + 4]
mov dword [ebp - 8], edi
jmp 0x42073d
mov edx, dword [edi]
sub eax, ecx
xor ecx, ecx
jmp 0x420727
sub eax, edx
inc ecx
mov edx, dword [edi + ecx*4]
mov edx, dword [edx + 4]
cmp eax, edx
jge 0x420721
mov edx, dword [edi + ecx*4]
mov ecx, eax
imul ecx, ecx, 0x14
add ecx, dword [edx]
mov dword [ebp - 8], ecx
mov edi, ecx
mov ecx, dword [ebx + 0x64]
and cl, 3
cmp cl, 1
jne 0x4207f0
cdq
mov dword [esi + 0x10], eax
push 4
pop ecx
mov word [esi + 0x1c], cx
mov byte [esi + 0x1e], 1
mov dword [esi + 0x14], edx
mov eax, 0xa02
mov word [esi + 0x44], ax
movzx eax, byte [edi]
mov ecx, dword [eax*4 + 0x467b90]
mov dword [esi + 0x2c], ecx
call fcn.0040ddf8
mov dword [esi + 0x40], eax
mov word [esi + 0x46], 0x103
add esi, 0x50
cmp byte [edi + 1], 0xee
jne 0x4207f0
mov ecx, dword [ebp - 4]
mov eax, ecx
shl eax, 2
mov dword [ebp - 0x18], eax
add eax, 4
mov dword [ebp - 0x14], eax
xor eax, eax
test ecx, ecx
jle 0x4207b3
mov ecx, dword [edi + 0x10]
mov edx, dword [ebp - 0xc]
cmp dword [edx + eax*4], ecx
je 0x4207b3
inc eax
cmp eax, dword [ebp - 4]
jl 0x4207a5
cmp eax, dword [ebp - 4]
jne 0x4207f0
mov edi, dword [ebp - 0x10]
xor eax, eax
cmp dword [ebp - 4], eax
setne al
push eax
mov eax, dword [ebp - 0x14]
call fcn.0041edf5
pop ecx
test eax, eax
jne 0x4207ed
mov edx, dword [ebp - 8]
mov edx, dword [edx + 0x10]
mov eax, edi
mov ecx, dword [eax + 4]
mov edi, dword [ebp - 0x18]
mov dword [edi + ecx], edx
mov ecx, dword [ebp - 0x14]
or word [eax + 0x1c], 0x10
mov dword [eax + 0x18], ecx
mov edi, dword [ebp - 8]
push 4
pop eax
mov word [esi + 0x1c], ax
mov eax, dword [edi + 4]
cdq
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], edx
mov byte [esi + 0x1e], 1
push 4
pop eax
mov word [esi + 0x44], ax
mov eax, dword [edi + 8]
cdq
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], edx
push 4
mov byte [esi + 0x46], 1
pop eax
mov word [esi + 0x6c], ax
mov eax, dword [edi + 0xc]
cdq
push 0
mov dword [esi + 0x60], eax
push 0x20
pop eax
lea edi, [esi + 0x78]
mov dword [esi + 0x64], edx
mov byte [esi + 0x6e], 1
call fcn.0041edf5
pop ecx
test eax, eax
jne 0x42064a
mov ecx, dword [esi + 0x7c]
mov eax, 0x602
mov word [esi + 0x94], ax
mov eax, dword [ebp - 8]
call fcn.004202b4
mov ecx, dword [esi + 0x7c]
cmp eax, ecx
je 0x420877
push 1
push eax
xor eax, eax
or ecx, 0xffffffff
lea edx, [esi + 0x78]
call fcn.0041f50c
pop ecx
pop ecx
jmp 0x420889
call fcn.0040ddf8
mov dword [esi + 0x90], eax
mov byte [esi + 0x97], 1
mov byte [esi + 0x96], 3
mov eax, dword [ebx + 0x64]
and al, 3
cmp al, 1
jne 0x4208ff
push 0
push 4
pop eax
lea edi, [esi + 0xa0]
call fcn.0041edf5
pop ecx
test eax, eax
jne 0x42064a
mov eax, 0x602
mov word [esi + 0xbc], ax
mov eax, dword [ebp - 8]
mov dword [esi + 0xb8], 2
movzx eax, byte [eax + 3]
push eax
push str._.2x
push dword [esi + 0xa4]
push 3
call fcn.0040d604
xor eax, eax
add esp, 0x10
mov word [esi + 0xbe], 0x103
inc eax
mov word [esi + 0xe4], ax
mov byte [esi + 0xe6], 5
mov ax, word [ebx + 0x64]
and ax, 3
push 2
dec ax
pop ecx
sub cx, ax
mov eax, dword [ebx + 8]
shl cx, 2
add eax, 0x28
mov word [ebx + 0x2c], cx
mov dword [ebx + 0x14], eax
push 0x64
and dword [ebx + 0x5c], 0
pop esi
mov eax, esi
pop edi
pop esi
leave
ret