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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x30]
mov ebp, dword [esp + 0x3c]
test eax, eax
je 0x4223a0
cmp byte [eax], 0x31
jne 0x4223a0
cmp dword [esp + 0x4c], 0x38
jne 0x4223a0
test esi, esi
je 0x422382
mov eax, dword [esi + 0x20]
mov dword [esi + 0x18], 0
test eax, eax
je 0x4223b0
mov edx, dword [esi + 0x24]
test edx, edx
je 0x4223d0
cmp dword [esp + 0x34], 0xffffffff
mov edx, 6
cmovne edx, dword [esp + 0x34]
test ebp, ebp
mov dword [esp + 0x34], edx
js 0x422390
cmp ebp, 0xf
jg 0x422370
xor ecx, ecx
mov edi, 1
mov edx, dword [esp + 0x40]
sub edx, 1
cmp edx, 8
ja 0x422382
cmp dword [esp + 0x38], 8
jne 0x422382
lea edx, [ebp - 8]
cmp edx, 7
ja 0x422382
cmp dword [esp + 0x34], 9
ja 0x422382
cmp dword [esp + 0x44], 4
ja 0x422382
cmp ebp, 8
mov edx, ebp
je 0x422570
mov dword [esp + 8], 0x16c4
mov dword [esp + 4], 1
mov ecx, dword [esi + 0x28]
mov dword [esp + 0xc], edx
mov dword [esp], ecx
call eax
test eax, eax
mov ebx, eax
je 0x4225a7
mov edx, dword [esp + 0xc]
mov ecx, ebp
mov dword [esi + 0x1c], eax
mov dword [eax + 0x18], edi
mov edi, 1
mov dword [eax], esi
mov dword [eax + 0x30], edx
mov edx, 0xaaaaaaab
mov dword [eax + 4], 0x2a
mov dword [eax + 0x1c], 0
mov eax, edi
shl eax, cl
mov dword [ebx + 0x2c], eax
mov ebp, eax
lea eax, [eax - 1]
mov dword [ebx + 0x34], eax
mov eax, dword [esp + 0x40]
lea ecx, [eax + 7]
mov eax, edi
shl eax, cl
mov dword [ebx + 0x50], ecx
mov ecx, eax
mov dword [ebx + 0x4c], eax
mov eax, dword [esp + 0x40]
sub ecx, 1
mov dword [ebx + 0x54], ecx
add eax, 9
mul edx
shr edx, 1
mov dword [ebx + 0x58], edx
mov dword [esp + 8], 2
mov dword [esp + 4], ebp
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov dword [ebx + 0x38], eax
mov dword [esp + 8], 2
mov eax, dword [ebx + 0x2c]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov dword [ebx + 0x40], eax
mov dword [esp + 8], 2
mov eax, dword [ebx + 0x4c]
mov dword [esp + 4], eax
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov dword [ebx + 0x16c0], 0
mov dword [ebx + 0x44], eax
mov eax, dword [esp + 0x40]
lea ecx, [eax + 6]
shl edi, cl
mov dword [ebx + 0x169c], edi
mov dword [esp + 4], edi
mov dword [esp + 8], 4
mov eax, dword [esi + 0x28]
mov dword [esp], eax
call dword [esi + 0x20]
mov edx, dword [ebx + 0x169c]
mov edi, dword [ebx + 0x38]
lea ecx, [edx*4]
test edi, edi
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], ecx
je 0x422586
mov ecx, dword [ebx + 0x40]
test ecx, ecx
je 0x422586
mov ebp, dword [ebx + 0x44]
test ebp, ebp
je 0x422586
test eax, eax
je 0x422586
mov ecx, edx
and ecx, 0xfffffffe
lea edx, [edx + edx*2]
add ecx, eax
add eax, edx
mov dword [ebx + 0x1698], eax
mov eax, dword [esp + 0x34]
mov dword [ebx + 0x16a4], ecx
mov byte [ebx + 0x24], 8
mov dword [ebx + 0x84], eax
mov eax, dword [esp + 0x44]
mov dword [ebx + 0x88], eax
mov edi, dword [esi + 0x20]
test edi, edi
je 0x422382
mov ebx, dword [esi + 0x24]
test ebx, ebx
je 0x422382
mov ebx, dword [esi + 0x1c]
mov eax, 0xfffffffe
test ebx, ebx
je 0x422362
cmp esi, dword [ebx]
je 0x4223e0
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
sub ebp, 0x10
mov ecx, 1
mov edi, 2
jmp 0x42218f
add esp, 0x1c
mov eax, 0xfffffffe
pop ebx
pop esi
pop edi
pop ebp
ret
neg ebp
mov ecx, 1
xor edi, edi
jmp 0x42218f
add esp, 0x1c
mov eax, 0xfffffffa
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [esi + 0x24]
mov eax, 0x41d8a0
mov dword [esi + 0x20], 0x41d8a0
mov dword [esi + 0x28], 0
test edx, edx
jne 0x422164
nop
mov dword [esi + 0x24], 0x41d8c0
jmp 0x422164
mov edx, dword [ebx + 4]
cmp edx, 0x2a
je 0x422413
cmp edx, 0x39
je 0x422413
cmp edx, 0x45
je 0x422413
cmp edx, 0x49
je 0x422413
cmp edx, 0x5b
je 0x422413
cmp edx, 0x67
nop
je 0x422413
cmp edx, 0x71
je 0x422413
cmp edx, 0x29a
jne 0x422362
mov dword [esi + 0x14], 0
mov dword [esi + 8], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x2c], 2
mov eax, dword [ebx + 8]
mov dword [ebx + 0x14], 0
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x18]
test eax, eax
jns 0x422448
neg eax
mov dword [ebx + 0x18], eax
cmp eax, 2
je 0x422545
cmp eax, 1
sbb eax, eax
and eax, 0x47
add eax, 0x2a
mov dword [ebx + 4], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.0041dc90
mov dword [esi + 0x30], eax
mov dword [ebx + 0x28], 0
mov dword [esp], ebx
call fcn.00424260
mov ebx, dword [esi + 0x1c]
xor ecx, ecx
mov eax, dword [ebx + 0x2c]
mov edx, dword [ebx + 0x4c]
add eax, eax
mov dword [ebx + 0x3c], eax
mov eax, dword [ebx + 0x44]
mov word [eax + edx*2 - 2], cx
mov eax, dword [ebx + 0x4c]
lea edx, [eax + eax - 2]
mov eax, dword [ebx + 0x44]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [ebx + 0x84]
mov dword [ebx + 0x6c], 0
mov dword [ebx + 0x5c], 0
mov dword [ebx + 0x74], 0
lea edx, [eax + eax*2]
shl edx, 2
lea eax, [edx + 0x4be880]
movzx ecx, word [edx + 0x4be882]
movzx edx, word [edx + 0x4be880]
mov dword [ebx + 0x16b4], 0
mov dword [ebx + 0x78], 2
mov dword [ebx + 0x80], ecx
mov dword [ebx + 0x8c], edx
movzx edx, word [eax + 4]
movzx eax, word [eax + 6]
mov dword [ebx + 0x60], 2
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x90], edx
mov dword [ebx + 0x7c], eax
xor eax, eax
mov dword [ebx + 0x48], 0
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebx + 4], 0x39
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.004140b0
jmp 0x42247b
test cl, cl
jne 0x422382
mov edx, 9
mov bp, 9
jmp 0x4221d7
mov eax, dword [str.insufficient_memory]
mov dword [ebx + 4], 0x29a
mov dword [esi + 0x18], eax
mov dword [esp], esi
call fcn.00421fe0
mov eax, 0xfffffffc
jmp 0x422362
mov eax, 0xfffffffc
jmp 0x422362