Function at 0x401e30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x405770]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x3c]
push esi
push edi
mov edi, dword [ebp + 8]
push 0x38
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push 0
push 0
push ebx
call esi
push ebx
push 1
lea eax, [ebp - 0x3c]
push 0x38
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x28
test eax, eax
je 0x402021
mov eax, 0xf1e0
cmp word [ebp - 0x38], ax
jne 0x402021
test byte [ebp - 0x34], 2
jne 0x401ea8
pop edi
pop esi
mov eax, 0x15
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004022ae
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp - 0x3c]
push ebx
call esi
push ebx
push 1
lea eax, [ebp - 0x54]
mov dword [ebp - 0x44], 0
xorps xmm0, xmm0
mov word [ebp - 0x40], 0
push 0x16
push eax
movups xmmword [ebp - 0x54], xmm0
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x1c
test eax, eax
je 0x402021
mov eax, 0xf1ef
cmp word [ebp - 0x50], ax
jne 0x402021
push dword [ebp - 0x54]
mov esi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
xorps xmm0, xmm0
movups xmmword [edi], xmm0
movq qword [edi + 0x10], xmm0
mov dword [edi + 0x18], 0
call esi
mov dword [edi], eax
add esp, 4
mov ax, word [ebp - 0x4a]
test ax, ax
jle 0x401f25
cwde
shl eax, 2
push eax
call esi
add esp, 4
mov dword [edi + 4], eax
mov ax, word [ebp - 0x46]
test ax, ax
jle 0x401f3b
cwde
shl eax, 2
push eax
call esi
add esp, 4
mov dword [edi + 0xc], eax
mov ax, word [ebp - 0x44]
test ax, ax
jle 0x401f51
cwde
shl eax, 2
push eax
call esi
add esp, 4
mov dword [edi + 0x10], eax
mov ax, word [ebp - 0x42]
test ax, ax
jle 0x401f6b
cwde
shl eax, 2
push eax
call esi
mov dword [edi + 0x14], eax
add esp, 4
mov ax, word [ebp - 0x42]
mov cx, word [ebp - 0x40]
test cx, cx
jle 0x401f8b
movsx eax, cx
shl eax, 2
push eax
call esi
mov cx, word [ebp - 0x40]
add esp, 4
mov dword [edi + 0x18], eax
mov ax, word [ebp - 0x42]
mov edx, dword [edi]
test edx, edx
je 0x402163
cmp word [ebp - 0x4a], 0
jle 0x401fa6
cmp dword [edi + 4], 0
je 0x402163
cmp word [ebp - 0x46], 0
jle 0x401fb7
cmp dword [edi + 0xc], 0
je 0x402163
cmp word [ebp - 0x44], 0
jle 0x401fc8
cmp dword [edi + 0x10], 0
je 0x402163
test cx, cx
jle 0x401fd7
cmp dword [edi + 0x18], 0
je 0x402163
test ax, ax
jle 0x401fe6
cmp dword [edi + 0x14], 0
je 0x402163
movups xmm0, xmmword [ebp - 0x54]
push ebx
movups xmmword [edx], xmm0
mov eax, dword [ebp - 0x44]
mov dword [edx + 0x10], eax
mov ax, word [ebp - 0x40]
mov word [edx + 0x14], ax
mov esi, dword [ebp - 0x54]
mov eax, dword [edi]
add esi, 0xffffffea
push esi
add eax, 0x16
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
cmp eax, esi
jae 0x402037
push edi
call fcn.00401da0
add esp, 4
pop edi
pop esi
mov eax, 0x11
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004022ae
mov esp, ebp
pop ebp
ret
mov ecx, dword [edi]
xor eax, eax
add ecx, 0x16
xor edx, edx
cmp ax, word [ebp - 0x4a]
jge 0x402064
mov eax, dword [edi + 4]
mov dword [eax + edx*4], ecx
add ecx, 5
cmp byte [ecx], 0
je 0x40205a
inc ecx
cmp byte [ecx], 0
jne 0x402054
movsx eax, word [ebp - 0x4a]
inc edx
inc ecx
cmp edx, eax
jl 0x402046
movzx eax, word [ebp - 0x48]
mov dword [edi + 8], ecx
lea eax, [ecx + eax*8]
test eax, eax
je 0x402080
mov ecx, dword [eax]
cmp ecx, dword [eax - 8]
jle 0x402080
add eax, 0x80000
jne 0x402072
xor ecx, ecx
xor edx, edx
cmp cx, word [ebp - 0x46]
jge 0x4020c4
mov esi, dword [edi + 0xc]
nop dword [eax]
mov dword [esi + edx*4], eax
add eax, 0x13
cmp byte [eax], 0
je 0x4020a6
nop dword [eax + eax]
inc eax
cmp byte [eax], 0
jne 0x4020a0
mov esi, dword [edi + 0xc]
inc eax
mov ecx, dword [esi + edx*4]
movsx ecx, word [ecx + 0x10]
test ecx, ecx
jle 0x4020bb
lea ecx, [ecx + ecx*2]
lea eax, [eax + ecx*2]
movsx ecx, word [ebp - 0x46]
inc edx
cmp edx, ecx
jl 0x402090
xor ecx, ecx
xor edx, edx
cmp cx, word [ebp - 0x44]
jge 0x4020f0
nop
mov ecx, dword [edi + 0x10]
mov dword [ecx + edx*4], eax
add eax, 2
cmp byte [eax], 0
je 0x4020e6
nop
inc eax
cmp byte [eax], 0
jne 0x4020e0
movsx ecx, word [ebp - 0x44]
inc edx
inc eax
cmp edx, ecx
jl 0x4020d0
xor ecx, ecx
xor edx, edx
cmp cx, word [ebp - 0x42]
jge 0x402120
nop word [eax + eax]
mov ecx, dword [edi + 0x14]
mov dword [ecx + edx*4], eax
add eax, 6
cmp byte [eax], 0
je 0x402116
nop
inc eax
cmp byte [eax], 0
jne 0x402110
movsx ecx, word [ebp - 0x42]
inc edx
inc eax
cmp edx, ecx
jl 0x402100
xor ecx, ecx
xor edx, edx
cmp cx, word [ebp - 0x40]
jge 0x402150
nop word [eax + eax]
mov ecx, dword [edi + 0x18]
mov dword [ecx + edx*4], eax
add eax, 4
cmp byte [eax], 0
je 0x402146
nop
inc eax
cmp byte [eax], 0
jne 0x402140
movsx ecx, word [ebp - 0x40]
inc edx
inc eax
cmp edx, ecx
jl 0x402130
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004022ae
mov esp, ebp
pop ebp
ret
push edi
call fcn.00401da0
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
mov eax, 0x10
pop edi
pop esi
pop ebx
call fcn.004022ae
mov esp, ebp
pop ebp
ret