Function at 0x49d2c0
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x202c
call fcn.005d9990
mov eax, dword [esp + 0x2044]
push ebx
mov ebx, dword [esp + 0x2034]
push esi
xor esi, esi
cmp eax, esi
mov dword [ebx + 0x568], esi
mov dword [ebx + 0x56c], esi
je 0x49d319
mov eax, dword [ebx + 0x564]
push esi
push esi
push esi
push eax
call fcn.0049d260
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x49d319
mov eax, 1
pop esi
mov dword [ebx + 0x56c], eax
pop ebx
add esp, 0x202c
ret
push ebp
push edi
jmp 0x49d330
mov ebx, dword [esp + 0x2040]
xor esi, esi
jmp 0x49d330
mov eax, dword [ebx + 0x564]
mov edi, 1
push edi
lea ecx, [esp + 0x28]
push ecx
push esi
push eax
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x20], ebp
jne 0x49d36e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x49d6bc
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, ebp
and edx, ecx
cmp edx, 0xffffffff
je 0x49d6bc
lea eax, [esp + 0x34]
push 0x2008
push eax
mov dword [esp + 0x24], esi
call fcn.004232e0
mov eax, dword [ebx + 0x564]
add esp, 8
push esi
lea ecx, [esp + 0x20]
push ecx
push 0x2000
lea edx, [esp + 0x40]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49d6bc
mov edx, dword [esp + 0x1c]
cmp edx, esi
je 0x49d6cf
xor eax, eax
xor edi, edi
test eax, eax
jl 0x49d324
jg 0x49d3e5
test edx, edx
jbe 0x49d324
jmp 0x49d3e5
mov ebx, dword [esp + 0x2040]
mov ecx, dword [esp + 0x2048]
test ecx, ecx
jl 0x49d424
jg 0x49d3fd
mov ecx, dword [esp + 0x2044]
test ecx, ecx
jbe 0x49d424
add dword [esp + 0x2044], 0xffffffff
adc dword [esp + 0x2048], 0xffffffff
js 0x49d6e2
jg 0x49d424
mov ecx, dword [esp + 0x2044]
test ecx, ecx
jbe 0x49d6e2
cmp edi, eax
mov ebx, esi
mov dword [esp + 0x30], edi
jg 0x49d4ff
jl 0x49d440
cmp esi, edx
jae 0x49d4f5
lea esp, [esp]
mov cl, byte [esp + esi + 0x34]
cmp cl, 0xd
je 0x49d46b
cmp cl, 0xa
je 0x49d4ea
add esi, 1
adc edi, 0
cmp edi, eax
jl 0x49d440
jg 0x49d4f5
cmp esi, edx
jb 0x49d440
jmp 0x49d4f5
mov byte [esp + esi + 0x34], 0
add esi, 1
adc edi, 0
cmp edi, eax
jl 0x49d4d3
jg 0x49d480
cmp esi, edx
jb 0x49d4d3
mov eax, dword [esp + 0x2040]
push 0
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [eax + 0x564]
push 1
lea edx, [esp + 0x27]
push edx
push ecx
mov dword [esp + 0x3c], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49d747
mov eax, dword [esp + 0x28]
test eax, eax
je 0x49d764
cmp byte [esp + 0x1b], 0xa
jne 0x49d4d3
mov eax, dword [esp + 0x1c]
inc eax
mov byte [esp + esi + 0x34], 0xa
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x1c]
xor eax, eax
cmp edi, eax
jg 0x49d4ff
jl 0x49d4e3
cmp esi, edx
jae 0x49d4f5
cmp byte [esp + esi + 0x34], 0xa
jne 0x49d4f5
mov byte [esp + esi + 0x34], 0
add esi, 1
adc edi, 0
cmp edi, eax
jl 0x49d50d
jg 0x49d4ff
cmp esi, edx
jb 0x49d50d
mov ecx, dword [esp + 0x30]
mov edx, ebx
or edx, ecx
jne 0x49d61a
mov eax, dword [esp + 0x2050]
cmp eax, 2
jne 0x49d5aa
mov ecx, dword [esp + 0x204c]
push 1
push 0
lea eax, [esp + ebx + 0x3c]
push eax
push ecx
call fcn.0058df80
add esp, 0x10
test eax, eax
je 0x49d5f9
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x2040]
mov eax, dword [esi + 0x564]
add ebp, ebx
adc edx, ecx
push 0
mov dword [esp + 0x18], edx
lea edx, [esp + 0x18]
mov ecx, ebp
push edx
push ecx
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x49d587
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x49d590
mov eax, dword [esp + 0x10]
and eax, dword [esp + 0x14]
cmp eax, 0xffffffff
jne 0x49d59a
mov dword [esi + 0x56c], 1
pop edi
pop ebp
pop esi
mov eax, 1
pop ebx
add esp, 0x202c
ret
cmp eax, 3
jne 0x49d5f9
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [esp + 0x2074]
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push edx
lea eax, [esp + ebx + 0x8c]
push eax
call fcn.0051f4b0
add esp, 0x5c
test eax, eax
jg 0x49d53e
mov edx, dword [esp + 0x1c]
xor eax, eax
cmp edi, eax
jl 0x49d3de
jg 0x49d31d
cmp esi, edx
jb 0x49d3de
jmp 0x49d31d
mov eax, dword [esp + 0x2048]
test eax, eax
jl 0x49d654
jg 0x49d632
mov eax, dword [esp + 0x2044]
test eax, eax
jbe 0x49d654
mov edx, dword [esp + 0x2044]
mov eax, dword [esp + 0x2048]
add edx, 1
adc eax, 0
mov dword [esp + 0x2044], edx
mov dword [esp + 0x2048], eax
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x2040]
mov eax, dword [esi + 0x564]
add ebp, ebx
adc edx, ecx
push 0
mov dword [esp + 0x18], edx
lea edx, [esp + 0x18]
mov ecx, ebp
push edx
push ecx
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x49d699
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x49d6a6
mov eax, dword [esp + 0x10]
and eax, dword [esp + 0x14]
cmp eax, 0xffffffff
jne 0x49d31d
pop edi
mov eax, 1
pop ebp
mov dword [esi + 0x56c], eax
pop esi
pop ebx
add esp, 0x202c
ret
mov dword [ebx + 0x56c], edi
mov eax, edi
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x202c
ret
mov dword [ebx + 0x568], edi
mov eax, edi
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x202c
ret
mov edx, dword [esp + 0x24]
mov eax, dword [ebx + 0x564]
add ebp, esi
adc edx, edi
push 0
mov dword [esp + 0x18], edx
lea edx, [esp + 0x18]
mov ecx, ebp
push edx
push ecx
push eax
mov dword [esp + 0x20], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x49d720
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x49d72d
mov eax, dword [esp + 0x10]
and eax, dword [esp + 0x14]
cmp eax, 0xffffffff
jne 0x49d59a
pop edi
pop ebp
pop esi
mov dword [ebx + 0x56c], 1
mov eax, 1
pop ebx
add esp, 0x202c
ret
mov ecx, dword [esp + 0x2040]
pop edi
pop ebp
mov eax, 1
pop esi
mov dword [ecx + 0x56c], eax
pop ebx
add esp, 0x202c
ret
mov edx, dword [esp + 0x2040]
pop edi
pop ebp
mov eax, 1
pop esi
mov dword [edx + 0x568], eax
pop ebx
add esp, 0x202c
ret