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

Disassembly:
sub esp, 0x118
push ebx
push ebp
push esi
mov esi, dword [esp + 0x12c]
push edi
mov edi, dword [sym.imp.MSVCRT.dll_strncmp]
push 2
mov ebx, 1
xor ebp, ebp
push 0x438dc0
push esi
mov dword [esp + 0x40], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x30], ebp
call edi
add esp, 0xc
test eax, eax
je 0x4221bc
push 2
push 0x438dbc
push esi
call edi
add esp, 0xc
test eax, eax
jne 0x4221c3
mov dword [esp + 0x24], ebx
add esi, 2
mov ebx, dword [sym.imp.MSVCRT.dll_strstr]
push 0x434cb4
push esi
call ebx
add esp, 8
test eax, eax
je 0x4222fb
cmp esi, ebp
je 0x422430
mov ebp, dword [sym.imp.MSVCRT.dll_sscanf]
cmp byte [esi], 0
je 0x422430
cmp dword [esp + 0x10], 0xa
jge 0x422430
lea eax, [esp + 0x14]
lea ecx, [esp + 0x30]
push eax
lea edx, [esp + 0x24]
push ecx
lea eax, [esp + 0x30]
push edx
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x2c]
push ecx
push edx
push str._d._d._d__d._d._d
push esi
mov dword [esp + 0x54], 0
call ebp
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x30]
mov eax, ecx
add esp, 0x20
sub eax, edx
mov dword [esp + edi*4 + 0x60], eax
jns 0x42224d
mov dword [esp + edi*4 + 0x60], 0
lea eax, [ecx + edx]
cmp eax, 0x168
mov dword [esp + edi*4 + 0xb0], eax
jle 0x422269
mov dword [esp + edi*4 + 0xb0], 0x168
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x30]
mov eax, ecx
sub eax, edx
mov dword [esp + edi*4 + 0x38], eax
jns 0x422283
mov dword [esp + edi*4 + 0x38], 0
lea eax, [ecx + edx]
cmp eax, 0x64
mov dword [esp + edi*4 + 0x88], eax
jle 0x42229d
mov dword [esp + edi*4 + 0x88], 0x64
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
mov eax, ecx
sub eax, edx
mov dword [esp + edi*4 + 0xd8], eax
jns 0x4222bd
mov dword [esp + edi*4 + 0xd8], 0
lea eax, [ecx + edx]
cmp eax, 0x64
mov dword [esp + edi*4 + 0x100], eax
jle 0x4222d7
mov dword [esp + edi*4 + 0x100], 0x64
push 0x438da4
push esi
call ebx
mov esi, eax
add esp, 8
test esi, esi
je 0x4222e9
inc esi
inc edi
test esi, esi
mov dword [esp + 0x10], edi
jne 0x4221ea
jmp 0x422430
cmp esi, ebp
mov ebx, esi
je 0x422430
cmp byte [ebx], 0
je 0x422430
cmp dword [esp + 0x10], 0xa
jge 0x422430
xor eax, eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], eax
lea eax, [esp + 0x14]
push eax
push ecx
push 0x438d9c
push ebx
call dword [sym.imp.MSVCRT.dll_sscanf]
mov eax, dword [esp + 0x24]
xor ecx, ecx
mov cl, ah
and eax, 0xff
mov ebp, ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x30], eax
xor edx, edx
mov dl, byte [esp + 0x26]
xor eax, eax
mov al, ch
and ecx, 0xff
mov esi, edx
xor edx, edx
mov dl, byte [esp + 0x2a]
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x20]
add esp, 0x10
mov edi, edx
sub edx, esi
lea ecx, [esp + ecx*4 + 0x100]
mov dword [ecx], edx
jns 0x422388
mov dword [ecx], 0
mov ecx, dword [esp + 0x10]
lea edx, [edi + esi]
cmp edx, 0xff
mov dword [esp + ecx*4 + 0x88], edx
jle 0x4223a9
mov dword [esp + ecx*4 + 0x88], 0xff
mov edx, eax
sub edx, ebp
mov dword [esp + ecx*4 + 0x38], edx
jns 0x4223bb
mov dword [esp + ecx*4 + 0x38], 0
add eax, ebp
cmp eax, 0xff
mov dword [esp + ecx*4 + 0xb0], eax
jle 0x4223d6
mov dword [esp + ecx*4 + 0xb0], 0xff
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov eax, esi
sub eax, edx
mov dword [esp + ecx*4 + 0x60], eax
jns 0x4223f0
mov dword [esp + ecx*4 + 0x60], 0
lea eax, [esi + edx]
lea ecx, [esp + ecx*4 + 0xd8]
cmp eax, 0xff
mov dword [ecx], eax
jle 0x422409
mov dword [ecx], 0xff
push 0x438da4
push ebx
call dword [sym.imp.MSVCRT.dll_strstr]
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x42241f
inc ebx
mov ecx, dword [esp + 0x10]
inc ecx
test ebx, ebx
mov dword [esp + 0x10], ecx
jne 0x422305
mov ebp, dword [esp + 0x134]
mov edx, dword [ebp + 4]
imul edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
mov eax, dword [esp + 0x144]
add esp, 4
test edi, edi
mov dword [eax], edi
jne 0x422487
mov ecx, dword [esp + 0x12c]
push 0x43a4e4
push ecx
call fcn.00420310
mov edx, dword [esp + 0x140]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret
mov eax, dword [esp + 0x24]
mov ecx, dword [ebp + 4]
test eax, eax
je 0x42249d
imul ecx, dword [ebp + 8]
mov eax, 0x1010101
jmp 0x4224a3
imul ecx, dword [ebp + 8]
xor eax, eax
mov edx, ecx
mov dword [esp + 0x18], 0
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 8]
test eax, eax
jle 0x42276e
mov eax, dword [esp + 0x138]
mov dword [esp + 0x1c], eax
mov ecx, dword [ebp + 4]
xor ebx, ebx
test ecx, ecx
jle 0x422749
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4225e3
mov eax, dword [esp + 0x10]
xor ecx, ecx
test eax, eax
jle 0x422732
mov eax, dword [esp + 0x24]
test eax, eax
mov eax, dword [ebp + 8]
jne 0x422527
mov edx, dword [esp + 0x140]
imul eax, ebx
mov esi, dword [edx]
mov edx, dword [esp + 0x18]
add eax, esi
lea edi, [eax + edx]
mov al, byte [eax + edx]
cmp al, 1
je 0x422732
jmp 0x422547
mov edx, dword [esp + 0x140]
imul eax, ebx
mov esi, dword [edx]
mov edx, dword [esp + 0x18]
add eax, esi
lea edi, [eax + edx]
mov al, byte [eax + edx]
test al, al
je 0x422732
mov eax, dword [esp + 0x14]
xor edx, edx
mov eax, dword [eax]
mov dword [esp + 0x28], eax
mov dl, byte [esp + 0x2a]
mov esi, edx
xor edx, edx
mov dl, ah
and eax, 0xff
cmp dword [esp + 0x24], 0
jne 0x42259e
cmp esi, dword [esp + ecx*4 + 0x100]
jl 0x4225d1
cmp esi, dword [esp + ecx*4 + 0x88]
jg 0x4225d1
cmp edx, dword [esp + ecx*4 + 0x38]
jl 0x4225d1
cmp edx, dword [esp + ecx*4 + 0xb0]
jg 0x4225d1
cmp eax, dword [esp + ecx*4 + 0x60]
jl 0x4225d1
cmp eax, dword [esp + ecx*4 + 0xd8]
jg 0x4225d1
mov byte [edi], 1
jmp 0x4225d1
cmp esi, dword [esp + ecx*4 + 0x100]
jl 0x4225d1
cmp esi, dword [esp + ecx*4 + 0x88]
jg 0x4225d1
cmp edx, dword [esp + ecx*4 + 0x38]
jl 0x4225d1
cmp edx, dword [esp + ecx*4 + 0xb0]
jg 0x4225d1
cmp eax, dword [esp + ecx*4 + 0x60]
jl 0x4225d1
cmp eax, dword [esp + ecx*4 + 0xd8]
jg 0x4225d1
mov byte [edi], 0
mov eax, dword [esp + 0x10]
inc ecx
cmp ecx, eax
jl 0x4224fa
jmp 0x422732
mov eax, dword [esp + 0x10]
xor esi, esi
test eax, eax
jle 0x422732
mov eax, dword [esp + 0x140]
mov edi, dword [esp + 0x18]
jmp 0x422605
mov eax, dword [esp + 0x140]
mov ecx, dword [esp + 0x24]
test ecx, ecx
jne 0x422623
mov ecx, dword [ebp + 8]
mov edx, dword [eax]
imul ecx, ebx
add ecx, edx
cmp byte [ecx + edi], 1
je 0x422732
jmp 0x422637
mov edx, dword [ebp + 8]
mov ecx, dword [eax]
imul edx, ebx
add edx, ecx
cmp byte [edx + edi], 0
je 0x422732
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x20]
lea edx, [esp + 0x2c]
push ecx
mov eax, dword [eax]
push edx
mov edx, eax
lea ecx, [esp + 0x38]
and edx, 0xff
push ecx
push edx
xor ecx, ecx
xor edx, edx
mov dword [esp + 0x38], eax
mov dl, byte [esp + 0x3a]
mov cl, ah
push ecx
push edx
call fcn.00422790
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + esi*4 + 0x78]
add esp, 0x18
test eax, eax
mov eax, dword [esp + 0x30]
jne 0x4226d8
cmp eax, ecx
jl 0x422725
cmp eax, dword [esp + esi*4 + 0xb0]
jg 0x422725
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + esi*4 + 0x38]
cmp eax, ecx
jl 0x422725
cmp eax, dword [esp + esi*4 + 0x88]
jg 0x422725
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + esi*4 + 0xd8]
cmp eax, ecx
jl 0x422725
cmp eax, dword [esp + esi*4 + 0x100]
jg 0x422725
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x140]
imul eax, ebx
add eax, dword [ecx]
mov byte [eax + edi], 1
jmp 0x422725
cmp eax, ecx
jl 0x422725
cmp eax, dword [esp + esi*4 + 0xb0]
jg 0x422725
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + esi*4 + 0x38]
cmp eax, ecx
jl 0x422725
cmp eax, dword [esp + esi*4 + 0x88]
jg 0x422725
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + esi*4 + 0xd8]
cmp eax, ecx
jl 0x422725
cmp eax, dword [esp + esi*4 + 0x100]
jg 0x422725
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x140]
imul edx, ebx
add edx, dword [eax]
mov byte [edx + edi], 0
mov eax, dword [esp + 0x10]
inc esi
cmp esi, eax
jl 0x4225fe
mov ecx, dword [esp + 0x14]
mov eax, dword [ebp + 4]
inc ebx
add ecx, 4
cmp ebx, eax
mov dword [esp + 0x14], ecx
jl 0x4224e0
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0x13c]
mov edx, dword [ebp + 8]
inc ecx
add eax, esi
cmp ecx, edx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
jl 0x4224cf
mov ecx, dword [esp + 0x138]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret