Function at 0x4a4070
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push esi
mov esi, dword [esp + 0x24]
mov dword [esp + 4], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x5a
test esi, esi
jne 0x4a409b
xor eax, eax
pop esi
add esp, 0x18
ret
push ebx
mov ebx, dword [esp + 0x2c]
push ebp
push edi
test ebx, ebx
je 0x4a44e4
mov edi, dword [esp + 0x38]
test edi, edi
je 0x4a44e4
push 8
push 0x4043ec
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x4a4275
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], eax
mov eax, dword [0x4010c0]
cmp dword [eax + 0x58], 0
je 0x4a44e4
push 0x20
call dword [fcn.00401034]
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4a4192
mov eax, dword [0x4010c0]
push 0x20
push ebp
push edi
mov eax, dword [eax + 0x58]
push ebx
call eax
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4a412a
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x34]
push eax
push 0x20
push ebp
call fcn.004c1c80
add esp, 0x10
mov edi, eax
push ebp
call dword [fcn.00401038]
add esp, 4
test edi, edi
je 0x4a4142
mov eax, edi
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x18
ret
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4a4175
cmp byte [eax + 0x68a], 0
je 0x4a4175
mov ecx, dword [eax + 0xca8]
test ecx, ecx
je 0x4a4163
cmp dword [ecx + 4], 1
jl 0x4a4175
push dword [esp + 0x30]
push 0x4043f8
push eax
call fcn.004ab3a0
add esp, 0xc
push esi
call dword [fcn.00401040]
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4a419f
push dword [esp + 0x30]
call dword [fcn.00401038]
add esp, 4
pop edi
pop ebp
pop ebx
mov eax, 0x1b
pop esi
add esp, 0x18
ret
mov esi, ebp
push 0x404418
push esi
call sub.VCRUNTIME140.dll_strstr
mov edi, eax
add esp, 8
test edi, edi
je 0x4a41b8
mov byte [edi], 0
add esi, 8
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4a41c0
mov ebx, dword [esp + 0x30]
sub ecx, edx
mov edx, dword [esp + 0x1c]
cmp edx, ecx
jne 0x4a4223
mov ecx, ebx
sub edx, 4
jb 0x4a41f1
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [esi]
jne 0x4a41f6
add ecx, 4
add esi, 4
sub edx, 4
jae 0x4a41e0
cmp edx, 0xfffffffc
je 0x4a426b
mov al, byte [ecx]
cmp al, byte [esi]
jne 0x4a4223
cmp edx, 0xfffffffd
je 0x4a426b
mov al, byte [ecx + 1]
cmp al, byte [esi + 1]
jne 0x4a4223
cmp edx, 0xfffffffe
je 0x4a426b
mov al, byte [ecx + 2]
cmp al, byte [esi + 2]
jne 0x4a4223
cmp edx, 0xffffffff
je 0x4a426b
mov al, byte [ecx + 3]
cmp al, byte [esi + 3]
je 0x4a426b
test edi, edi
je 0x4a4246
push 0x4043ec
push edi
mov byte [edi], 0x3b
call sub.VCRUNTIME140.dll_strstr
mov esi, eax
add esp, 8
test esi, esi
jne 0x4a41a1
mov ebx, dword [esp + 0x30]
push ebx
call dword [fcn.00401038]
push ebp
mov dword [esp + 0x38], 0
call dword [fcn.00401038]
mov eax, dword [esp + 0x1c]
add esp, 8
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x18
ret
mov dword [esp + 0x14], 0
jmp 0x4a4246
push 0x403748
push esi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fopen
add esp, 8
mov dword [esp + 0x30], eax
test eax, eax
je 0x4a44e4
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push 2
push 0
push eax
call esi
add esp, 0xc
test eax, eax
jne 0x4a4372
push dword [esp + 0x30]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push 0
push 0
push dword [esp + 0x3c]
mov ebp, eax
call esi
add esp, 0x10
test eax, eax
jne 0x4a4372
cmp ebp, 0x100000
ja 0x4a4372
mov eax, ebp
cdq
push edx
push eax
call fcn.004aeb40
mov esi, eax
add esp, 8
cmp edi, esi
ja 0x4a4372
lea eax, [esi + 1]
push eax
call dword [fcn.00401034]
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
je 0x4a4372
push dword [esp + 0x30]
push 1
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x4a4372
cmp edi, esi
jne 0x4a43a7
mov ecx, dword [esp + 0x10]
sub edi, 4
jb 0x4a4338
mov eax, dword [ebx]
cmp eax, dword [ecx]
jne 0x4a433d
add ebx, 4
add ecx, 4
sub edi, 4
jae 0x4a4327
cmp edi, 0xfffffffc
je 0x4a436a
mov al, byte [ebx]
cmp al, byte [ecx]
jne 0x4a4372
cmp edi, 0xfffffffd
je 0x4a436a
mov al, byte [ebx + 1]
cmp al, byte [ecx + 1]
jne 0x4a4372
cmp edi, 0xfffffffe
je 0x4a436a
mov al, byte [ebx + 2]
cmp al, byte [ecx + 2]
jne 0x4a4372
cmp edi, 0xffffffff
je 0x4a436a
mov al, byte [ebx + 3]
cmp al, byte [ecx + 3]
jne 0x4a4372
mov dword [esp + 0x14], 0
push dword [esp + 0x10]
call dword [fcn.00401038]
push dword [esp + 0x1c]
call dword [fcn.00401038]
push dword [esp + 0x38]
mov dword [esp + 0x24], 0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov eax, dword [esp + 0x20]
add esp, 0xc
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x18
ret
mov eax, dword [esp + 0x10]
xor ebp, ebp
push 0x4043b4
push eax
mov byte [esi + eax], 0
call sub.VCRUNTIME140.dll_strstr
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x4a4372
mov eax, dword [esp + 0x10]
mov esi, ecx
sub esi, eax
je 0x4a43d5
cmp byte [ecx - 1], 0xa
jne 0x4a4372
add esi, 0x1a
add eax, esi
push 0x4043d0
push eax
call sub.VCRUNTIME140.dll_strstr
add esp, 8
test eax, eax
je 0x4a4372
sub eax, dword [esp + 0x10]
mov dword [esp + 0x20], eax
sub eax, esi
inc eax
push eax
call dword [fcn.00401034]
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
je 0x4a4372
mov edx, dword [esp + 0x20]
cmp esi, edx
jae 0x4a443e
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x1c]
nop dword [eax]
mov cl, byte [esi + eax]
cmp cl, 0xa
je 0x4a4431
cmp cl, 0xd
je 0x4a4431
mov byte [ebx + ebp], cl
inc ebp
inc esi
cmp esi, edx
jb 0x4a4420
mov ebx, dword [esp + 0x34]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x24]
mov byte [eax + ebp], 0
push ecx
lea ecx, [esp + 0x1c]
push ecx
push eax
call fcn.004c1a60
push dword [esp + 0x28]
mov esi, eax
call dword [fcn.00401038]
add esp, 0x10
test esi, esi
jne 0x4a4372
cmp edi, dword [esp + 0x24]
jne 0x4a4372
mov ecx, dword [esp + 0x18]
sub edi, 4
jb 0x4a4491
nop dword [eax]
mov eax, dword [ebx]
cmp eax, dword [ecx]
jne 0x4a449a
add ebx, 4
add ecx, 4
sub edi, 4
jae 0x4a4480
cmp edi, 0xfffffffc
je 0x4a436a
mov al, byte [ebx]
cmp al, byte [ecx]
jne 0x4a44d7
cmp edi, 0xfffffffd
je 0x4a436a
mov al, byte [ebx + 1]
cmp al, byte [ecx + 1]
jne 0x4a44d7
cmp edi, 0xfffffffe
je 0x4a436a
mov al, byte [ebx + 2]
cmp al, byte [ecx + 2]
jne 0x4a44d7
cmp edi, 0xffffffff
je 0x4a436a
mov al, byte [ebx + 3]
cmp al, byte [ecx + 3]
je 0x4a436a
mov dword [esp + 0x14], 0x5a
jmp 0x4a4372
pop edi
pop ebp
pop ebx
mov eax, 0x5a
pop esi
add esp, 0x18
ret