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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x9c
mov eax, dword [0x4395c8]
xor eax, esp
mov dword [esp + 0x98], eax
mov eax, dword [ebp + 0x18]
and dword [esp + 0x78], 0
push ebx
push esi
push edi
push 7
mov dword [esp + 0x48], eax
lea edi, [esp + 0x8c]
xor eax, eax
mov dword [esp + 0x24], ecx
and dword [esp + 0x14], eax
mov esi, edx
mov edx, dword [ebp + 0x1c]
and dword [esp + 0x38], eax
pop ecx
rep stosd dword es:[edi], eax
and dword [edx], eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x88]
mov dword [esp + 0x4c], edx
mov edx, dword [ebp + 8]
push eax
lea eax, [esp + 0x54]
mov dword [esp + 0x44], 1
push eax
push ecx
push dword [ebp + 0x14]
push ecx
push ecx
push dword [ebp + 0xc]
mov ecx, esi
call fcn.00421d8e
mov edi, eax
mov dword [esp + 0x2c], edi
test edi, edi
js 0x4225ff
mov eax, dword [esp + 0x58]
shl eax, 2
push eax
mov eax, dword fs:[0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov ecx, eax
mov dword [esp + 0x28], ecx
test ecx, ecx
jne 0x4222f1
mov edi, 0xc0000017
jmp 0x4225ff
mov eax, dword [esp + 0x58]
xor edx, edx
xor esi, esi
mov dword [esp + 0x24], edx
mov dword [esp + 0x30], esi
test eax, eax
jle 0x422399
xor ebx, ebx
lea edi, [ecx - 4]
mov ecx, dword [esp + 0x5c]
cmp dword [ebx + ecx + 0x10], 0
je 0x422385
mov ecx, dword [ebx + ecx + 0x14]
mov dword [esp + 0x38], ecx
test ecx, ecx
je 0x422385
mov esi, edx
test edx, edx
je 0x422368
mov edx, dword [esp + 0x38]
mov ecx, edi
mov eax, dword [ecx]
cmp dword [eax + 0x14], edx
jb 0x422340
sub ecx, 4
sub esi, 1
jne 0x422331
mov edx, dword [esp + 0x24]
cmp esi, edx
je 0x422368
mov eax, dword [esp + 0x28]
lea ecx, [eax + esi*4]
mov eax, edx
sub eax, esi
shl eax, 2
push eax
push ecx
lea eax, [ecx + 4]
push eax
call sub.msvcrt.dll_memmove
mov edx, dword [esp + 0x30]
add esp, 0xc
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x28]
add eax, ebx
inc edx
add edi, 4
mov dword [esp + 0x24], edx
mov dword [ecx + esi*4], eax
mov eax, dword [esp + 0x58]
mov esi, dword [esp + 0x30]
inc esi
add ebx, 0x28
mov dword [esp + 0x30], esi
cmp esi, eax
jl 0x42230e
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x54]
mov dword [esp + 0x38], eax
cmp eax, dword [esp + 0x68]
jb 0x4223af
mov eax, dword [esp + 0x68]
mov dword [esp + 0x38], eax
xor ecx, ecx
mov dword [esp + 0x14], ecx
test edx, edx
jne 0x4223bf
mov eax, dword [esp + 0x60]
jmp 0x4223c8
mov eax, dword [esp + 0x28]
mov eax, dword [eax]
mov eax, dword [eax + 0x14]
or dword [esp + 0x30], 0xffffffff
xor esi, esi
xor ebx, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], esi
cmp edx, 0xffffffff
jle 0x422542
mov eax, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
and dword [esp + 0x10], 0
cmp ecx, 1
jne 0x422411
mov ecx, dword [esp + 0x20]
call fcn.004221b0
mov edi, eax
test edi, edi
js 0x4225ea
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
mov dword [eax], esi
mov eax, dword [esp + 0x18]
mov esi, dword [esp + 0x68]
sub esi, dword [esp + 0x10]
cmp eax, esi
jae 0x422423
mov esi, eax
mov edx, dword [esp + 0x1c]
add edx, esi
mov dword [esp + 0x40], edx
cmp edx, dword [ebp + 8]
ja 0x4225d7
cmp edx, dword [esp + 0x1c]
jb 0x4225d7
cmp ecx, 1
jne 0x42247a
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x4c]
push esi
push dword [esp + 0x20]
push eax
push dword [esp + 0x48]
lea eax, [esp + 0x94]
push eax
call fcn.0042269f
mov edi, eax
test edi, edi
js 0x4225ff
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x40]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x10]
add edx, esi
sub eax, esi
mov esi, dword [esp + 0x30]
mov dword [esp + 0x10], edx
mov dword [esp + 0x18], eax
jne 0x4224ef
inc esi
mov dword [esp + 0x30], esi
cmp ecx, 1
jne 0x4224af
push dword [esp + 0x38]
mov ecx, dword [esp + 0x24]
call fcn.0042261d
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x38]
dec edx
add edx, eax
dec eax
not eax
and edx, eax
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x24]
lea eax, [edx - 1]
cmp esi, eax
jge 0x4224df
mov eax, dword [esp + 0x28]
mov eax, dword [eax + esi*4 + 4]
mov eax, dword [eax + 0x14]
sub eax, dword [esp + 0x1c]
mov dword [esp + 0x18], eax
jmp 0x4224f9
cmp esi, edx
jge 0x4224f5
mov eax, dword [esp + 0x28]
mov eax, dword [eax + esi*4]
mov eax, dword [eax + 0x10]
jmp 0x4224d9
mov edx, dword [esp + 0x24]
jmp 0x4224f9
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esp + 0x68]
mov ecx, dword [esp + 0x14]
je 0x42250f
cmp esi, edx
jl 0x422415
cmp esi, edx
jge 0x42253e
cmp ecx, 1
jne 0x42252f
mov edx, dword [esp + 0x2c]
sub esp, 0xc
mov ecx, dword [esp + 0x2c]
lea edx, [edx + 4]
call fcn.00422210
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
inc ebx
add dword [esp + 0x2c], 0x44
jmp 0x4223ea
mov esi, dword [esp + 0x1c]
cmp ecx, 1
jne 0x422574
push dword [esp + 0x68]
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
call fcn.0042261d
mov edx, dword [esp + 0x34]
sub esp, 0xc
mov ecx, dword [esp + 0x2c]
add edx, 4
imul eax, ebx, 0x44
add edx, eax
call fcn.00422210
mov ecx, dword [esp + 0x14]
inc ebx
test ecx, ecx
jne 0x42259f
lea eax, [ebx + 1]
imul eax, eax, 0x44
push eax
mov eax, dword fs:[0x30]
push ecx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [esp + 0x34], eax
test eax, eax
jne 0x4225c0
mov edi, 0xc0000017
jmp 0x4225ea
mov ecx, dword [esp + 0x34]
imul eax, ebx, 0x44
push 0x40
push 0
mov dword [eax + ecx], esi
add ecx, 4
add eax, ecx
push eax
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x40]
add esp, 0xc
inc ebx
mov ecx, dword [esp + 0x14]
inc ecx
mov dword [esp + 0x14], ecx
cmp ecx, 2
jae 0x4225de
mov edx, dword [esp + 0x24]
jmp 0x4223b5
mov edi, 0xc0000428
jmp 0x4225ea
mov ecx, dword [esp + 0x44]
mov dword [ecx], ebx
mov ecx, dword [esp + 0x48]
mov dword [ecx], eax
push dword [esp + 0x28]
mov eax, dword fs:[0x30]
push 0
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov ecx, dword [esp + 0xa4]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0042fb30
mov esp, ebp
pop ebp
ret 0x18