Function at 0x401740
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404415
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x407040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x14], eax
xor esi, esi
mov dword [ebp - 0x14], eax
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
xor edx, edx
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x18], edx
mov dword [ebp - 4], edx
mov edi, dword [0x407098]
cmp edi, 0x400
jge 0x4017f0
nop dword [eax]
mov al, byte [edi + 0x4074b0]
lea ecx, [edi + 0x4074b0]
cmp al, 0xa
je 0x40182b
test al, al
je 0x4017f0
cmp al, 0xd
je 0x4017e7
cmp esi, edx
je 0x4017d4
mov byte [esi], al
inc esi
mov dword [ebp - 0x1c], esi
jmp 0x4017e7
push ecx
push esi
lea ecx, [ebp - 0x20]
call fcn.004030d0
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
mov dword [ebp - 0x28], edx
inc edi
cmp edi, 0x400
jl 0x4017b0
push 0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0x400
push 0x4074b0
push dword [0x4074a0]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401a28
mov edx, dword [ebp - 0x28]
xor edi, edi
mov dword [0x407098], edi
jmp 0x4017a1
lea eax, [edi + 1]
mov dword [ebp - 0x30], 0
mov edi, dword [ebp - 0x20]
xorps xmm0, xmm0
mov dword [0x407098], eax
mov dword [ebp - 0x2c], 0
movups xmmword [ebp - 0x40], xmm0
cmp edi, esi
jne 0x401866
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
jmp 0x401923
sub esi, edi
cmp esi, 0x7fffffff
ja 0x401a6f
cmp esi, 0xf
ja 0x401898
push esi
lea eax, [ebp - 0x40]
mov dword [ebp - 0x30], esi
push edi
push eax
mov dword [ebp - 0x2c], 0xf
call sub.VCRUNTIME140.dll_memcpy
mov byte [ebp + esi - 0x40], 0
jmp 0x401920
mov edi, esi
or edi, 0xf
cmp edi, 0x7fffffff
jbe 0x4018d0
mov ecx, 0x80000000
mov edi, 0x7fffffff
add ecx, 0x23
push ecx
call fcn.00403638
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x4019f8
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x401902
mov eax, 0x16
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
cmp eax, 0x1000
jb 0x4018f1
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401a74
jmp 0x4018b2
test eax, eax
je 0x401900
push eax
call fcn.00403638
add esp, 4
jmp 0x401902
xor eax, eax
mov dword [ebp - 0x2c], edi
mov edi, dword [ebp - 0x20]
push esi
push edi
push eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x30], esi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x14]
mov byte [eax + esi], 0
add esp, 0xc
push 0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], 0xf
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmova eax, dword [ebp - 0x40]
push 0
push dword [ebp - 0x30]
push eax
push 0
push 0xfde9
call esi
mov ecx, dword [ebp - 0x24]
xorps xmm0, xmm0
push eax
push ecx
mov dword [ebp - 0x14], eax
movups xmmword [ecx], xmm0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
call fcn.004029a0
mov eax, dword [ebp - 0x24]
mov ecx, eax
cmp dword [eax + 0x14], 7
jbe 0x401977
mov ecx, dword [eax]
push dword [ebp - 0x14]
cmp dword [ebp - 0x2c], 0xf
lea eax, [ebp - 0x40]
push ecx
push dword [ebp - 0x30]
cmova eax, dword [ebp - 0x40]
push eax
push 0
push 0xfde9
call esi
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x4019c3
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4019b9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4019f8
push ecx
push edx
call fcn.004038b9
add esp, 8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
test edi, edi
je 0x401a08
mov ecx, dword [ebp - 0x28]
mov eax, edi
sub ecx, edi
cmp ecx, 0x1000
jb 0x4019fe
mov edi, dword [eax - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4019fe
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edi
call fcn.004038b9
add esp, 8
mov esi, dword [ebp - 0x24]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040362a
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x24]
mov ecx, esi
push 0x405208
call fcn.00402370
mov edx, dword [ebp - 0x20]
test edx, edx
je 0x401a0b
mov ecx, dword [ebp - 0x28]
mov eax, edx
sub ecx, edx
cmp ecx, 0x1000
jb 0x401a63
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401a63
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004038b9
add esp, 8
jmp 0x401a0b
call fcn.00401220
call fcn.00401180
int3