Function at 0x49b0e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x2034
call fcn.005cd640
mov eax, dword [ebp + 0x1c]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
cmp eax, edi
mov dword [esi + 0x16c], edi
mov dword [esi + 0x170], edi
je 0x49b140
mov eax, dword [esi + 0x168]
push edi
push edi
push edi
push eax
call fcn.0049b080
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x49b140
mov eax, 1
mov dword [esi + 0x170], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
xor edi, edi
jmp 0x49b140
mov eax, dword [esi + 0x168]
push 1
lea ecx, [esp + 0x28]
push ecx
push edi
push eax
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x20], ebx
jne 0x49b176
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x49b124
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, ebx
and edx, ecx
cmp edx, 0xffffffff
je 0x49b124
mov edx, dword [esi + 0x168]
mov dword [esp + 0x1c], edi
xor eax, eax
push eax
mov ecx, 0x802
lea edi, [esp + 0x3c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
push eax
push 0x2000
lea ecx, [esp + 0x44]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49b124
mov edx, dword [esp + 0x1c]
test edx, edx
je 0x49b478
xor eax, eax
xor esi, esi
xor edi, edi
test eax, eax
jl 0x49b136
jg 0x49b1e0
test edx, edx
jbe 0x49b136
lea ecx, [ecx]
mov ecx, dword [ebp + 0x10]
test ecx, ecx
jl 0x49b20b
jg 0x49b1f0
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jbe 0x49b20b
add dword [ebp + 0xc], 0xffffffff
adc dword [ebp + 0x10], 0xffffffff
js 0x49b48a
jg 0x49b20b
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jbe 0x49b48a
cmp edi, eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], edi
jg 0x49b2e8
jl 0x49b225
cmp esi, edx
jae 0x49b2d6
mov cl, byte [esp + esi + 0x38]
cmp cl, 0xd
je 0x49b250
cmp cl, 0xa
je 0x49b2cb
add esi, 1
adc edi, 0
cmp edi, eax
jl 0x49b225
jg 0x49b2d6
cmp esi, edx
jb 0x49b225
jmp 0x49b2d6
mov byte [esp + esi + 0x38], 0
add esi, 1
adc edi, 0
cmp edi, eax
jl 0x49b2b4
jg 0x49b265
cmp esi, edx
jb 0x49b2b4
mov edx, dword [ebp + 8]
push 0
lea eax, [esp + 0x38]
push eax
mov eax, dword [edx + 0x168]
push 1
lea ecx, [esp + 0x27]
push ecx
push eax
mov dword [esp + 0x48], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x49b4f1
mov eax, dword [esp + 0x34]
test eax, eax
je 0x49b506
cmp byte [esp + 0x1b], 0xa
jne 0x49b2b4
mov eax, dword [esp + 0x1c]
inc eax
mov byte [esp + esi + 0x38], 0xa
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x1c]
xor eax, eax
cmp edi, eax
jg 0x49b2e8
jl 0x49b2c4
cmp esi, edx
jae 0x49b2d6
cmp byte [esp + esi + 0x38], 0xa
jne 0x49b2d6
mov byte [esp + esi + 0x38], 0
add esi, 1
adc edi, 0
cmp edi, eax
jl 0x49b377
jg 0x49b2e8
cmp esi, edx
jb 0x49b377
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov edx, ecx
or edx, eax
je 0x49b37b
mov eax, dword [ebp + 0x10]
test eax, eax
jl 0x49b31c
jg 0x49b30a
mov eax, dword [ebp + 0xc]
test eax, eax
jbe 0x49b31c
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
add edx, 1
adc eax, 0
mov dword [ebp + 0xc], edx
mov dword [ebp + 0x10], eax
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x168]
add ebx, ecx
adc edx, edi
push 0
mov dword [esp + 0x18], edx
lea edx, [esp + 0x18]
mov ecx, ebx
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 0x49b365
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x49b124
mov eax, dword [esp + 0x10]
and eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x49b124
jmp 0x49b136
mov ecx, dword [esp + 0x28]
mov eax, dword [ebp + 0x18]
cmp eax, 2
jne 0x49b40c
push 1
lea eax, [esp + ecx + 0x3c]
mov ecx, dword [ebp + 0x14]
push 0
push eax
push ecx
call fcn.00581d70
add esp, 0x10
test eax, eax
je 0x49b457
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x2c]
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x168]
add ebx, ecx
adc edx, edi
push 0
mov dword [esp + 0x18], edx
lea edx, [esp + 0x18]
mov ecx, ebx
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 0x49b3ed
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x49b3f6
mov eax, dword [esp + 0x10]
and eax, dword [esp + 0x14]
cmp eax, 0xffffffff
jne 0x49b400
mov dword [esi + 0x170], 1
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 3
jne 0x49b457
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp + 0x14]
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 + ecx + 0x90]
push eax
call fcn.00518970
add esp, 0x5c
test eax, eax
jg 0x49b3a4
mov edx, dword [esp + 0x1c]
xor eax, eax
cmp edi, eax
jl 0x49b1e0
jg 0x49b136
cmp esi, edx
jb 0x49b1e0
jmp 0x49b136
mov eax, 1
mov dword [esi + 0x16c], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x24]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x168]
add ebx, esi
adc edx, edi
push 0
mov dword [esp + 0x18], edx
lea edx, [esp + 0x18]
mov ecx, ebx
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 0x49b4cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x49b4d8
mov eax, dword [esp + 0x10]
and eax, dword [esp + 0x14]
cmp eax, 0xffffffff
jne 0x49b400
mov eax, dword [ebp + 8]
mov dword [eax + 0x170], 1
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
mov eax, 1
mov dword [ecx + 0x170], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
pop edi
mov eax, 1
pop esi
mov dword [edx + 0x16c], eax
pop ebx
mov esp, ebp
pop ebp
ret