Function at 0x422bd0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
cmp dword [ebp + 8], 0
jl 0x422bfa
mov eax, dword [ebp + 8]
cmp eax, dword [0x43eff4]
jge 0x422bfa
mov ecx, dword [ebp + 8]
imul ecx, ecx, 0x1c
mov edx, dword [0x43eff8]
cmp dword [edx + ecx], 0
jne 0x422c02
or eax, 0xffffffff
jmp 0x422e72
mov eax, dword [ebp + 8]
imul eax, eax, 0x1c
add eax, dword [0x43eff8]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x18], edx
cmp dword [ebp - 0x18], 0
je 0x422c2b
cmp dword [ebp - 0x18], 2
je 0x422c54
jmp 0x422e2e
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCR90.dll_fgets]
add esp, 0xc
test eax, eax
jne 0x422c4f
or eax, 0xffffffff
jmp 0x422e72
jmp 0x422e2e
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
movsx eax, byte [edx]
test eax, eax
je 0x422d35
mov dword [ebp - 0x10], 0
jmp 0x422c7e
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 0x10]
sub edx, 1
cmp dword [ebp - 0x10], edx
jge 0x422cc9
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
mov edx, dword [ebp - 0x10]
movsx eax, byte [ecx + edx]
test eax, eax
je 0x422cc9
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x10]
mov dl, byte [edx + ecx]
mov byte [eax], dl
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x10]
movsx ecx, byte [eax]
cmp ecx, 0xa
jne 0x422cc7
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
jmp 0x422cc9
jmp 0x422c75
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
jmp 0x422cda
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x18]
mov ecx, dword [ebp - 8]
movsx edx, byte [eax + ecx]
test edx, edx
je 0x422d08
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
mov edx, dword [ebp - 8]
sub edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x18]
mov esi, dword [ebp - 8]
mov cl, byte [ecx + esi]
mov byte [edx + eax], cl
jmp 0x422cd1
mov edx, dword [ebp - 8]
sub edx, dword [ebp - 0x10]
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x18]
mov byte [edx + ecx], 0
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 0x10]
mov byte [edx], 0
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x10]
movsx ecx, byte [eax - 1]
cmp ecx, 0xa
jne 0x422d35
jmp 0x422e2e
mov edx, dword [ebp + 0x10]
sub edx, 1
cmp dword [ebp - 0x10], edx
jge 0x422e2e
mov eax, dword [ebp + 0x10]
sub eax, dword [ebp - 0x10]
sub eax, 1
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x7ff
jle 0x422d60
mov dword [ebp - 0x14], 0x7ff
push 0
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x422d8a
or eax, 0xffffffff
jmp 0x422e72
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
jmp 0x422d9b
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0xc]
cmp dword [ebp - 0x14], edx
jae 0x422dc1
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x14]
movsx ecx, byte [eax]
cmp ecx, 0xa
jne 0x422dbf
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
jmp 0x422dc1
jmp 0x422d92
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
jmp 0x422dd2
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0xc]
cmp dword [ebp - 8], edx
jae 0x422df6
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 8]
mov cl, byte [ecx]
mov byte [eax + edx], cl
jmp 0x422dc9
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 0x14]
mov byte [edx], 0
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x18]
mov byte [eax + edx], 0
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x14]
movsx ecx, byte [eax - 1]
cmp ecx, 0xa
jne 0x422e20
jmp 0x422e2e
mov edx, dword [ebp - 0x10]
add edx, dword [ebp - 0xc]
mov dword [ebp - 0x10], edx
jmp 0x422d35
mov eax, dword [ebp + 0xc]
push eax
call sub.MSVCR90.dll_strlen
add esp, 4
sub eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp + 0xc]
add ecx, dword [ebp - 0x10]
movsx edx, byte [ecx]
cmp edx, 0xa
je 0x422e5c
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x10]
movsx ecx, byte [eax]
cmp ecx, 0xd
jne 0x422e70
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 0x10]
mov byte [edx], 0
mov eax, dword [ebp - 0x10]
sub eax, 1
mov dword [ebp - 0x10], eax
jmp 0x422e40
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret