Function at 0x1a0033e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov dword [ebp - 0x14], edx
mov eax, ecx
mov edx, dword [ebp + 8]
xor esi, esi
push edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], esi
call fcn.1a002bb0
mov ebx, eax
test ebx, ebx
je 0x1a00351b
mov ecx, dword [0x1a02bf00]
mov dword [ebp - 0x18], 0xac00
mov dword [ebp - 0x1c], 0xd7a3
nop dword [eax]
cmp dword [0x1a024064], 0xffffffff
jne 0x1a00342d
xor eax, eax
jmp 0x1a003484
cmp ebx, ecx
je 0x1a003482
mov esi, ebx
push 0
shl esi, 0xa
push esi
push dword [0x1a024064]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseek]
add esp, 0xc
cmp eax, esi
jne 0x1a003476
push 0x400
push 0x1a02bb00
push dword [0x1a024064]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__read]
add esp, 0xc
cmp eax, 0x400
jne 0x1a003476
mov ecx, ebx
mov dword [0x1a02bf00], ecx
jmp 0x1a00348c
xor ecx, ecx
xor eax, eax
mov dword [0x1a02bf00], ecx
jmp 0x1a003484
mov eax, ecx
cmp eax, ebx
jne 0x1a00351b
movzx eax, word [0x1a02bb00]
mov esi, 0x1a02bb04
mov edx, dword [ebp + 8]
xor edi, edi
imul eax, edx
lea eax, [eax*2 + 0x1a02bb04]
mov dword [ebp - 4], eax
cmp eax, esi
jbe 0x1a003509
lea eax, [edx + edx]
mov dword [ebp - 8], eax
movzx eax, word [esi]
mov ecx, 0xac00
cmp cx, ax
ja 0x1a0034e2
mov ecx, 0xd7a3
cmp cx, ax
jb 0x1a0034e2
push edx
push esi
push dword [ebp - 0x10]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
xor edi, edi
add esp, 0xc
test eax, eax
cmove edi, esi
jmp 0x1a0034f8
test edi, edi
je 0x1a0034fb
push edx
push esi
push dword [ebp - 0x14]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
add esp, 0xc
test eax, eax
je 0x1a003524
mov edx, dword [ebp + 8]
add esi, dword [ebp - 8]
cmp esi, dword [ebp - 4]
jb 0x1a0034b4
mov ecx, dword [0x1a02bf00]
mov dword [ebp - 0xc], ebx
movzx ebx, word [0x1a02bb02]
test ebx, ebx
jne 0x1a003420
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
lea ecx, [eax + eax]
mov eax, esi
sub eax, ecx
cmp edi, eax
jne 0x1a00357a
mov edx, dword [ebp - 4]
lea eax, [ecx + esi]
cmp eax, edx
je 0x1a003551
movzx eax, word [eax]
mov dword [ebp - 8], ecx
cmp word [ebp - 0x18], ax
ja 0x1a00357a
mov dword [ebp - 8], ecx
cmp word [ebp - 0x1c], ax
jb 0x1a00357a
sub edx, ecx
lea eax, [ecx + esi]
sub edx, esi
and edx, 0xfffffffe
push edx
push eax
push edi
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
shl eax, 2
sub ecx, eax
xor eax, eax
mov word [ecx], ax
mov eax, 0xfffe
jmp 0x1a0035a6
mov edi, dword [ebp - 4]
mov eax, edi
mov ecx, dword [ebp - 8]
sub eax, ecx
sub eax, esi
and eax, 0xfffffffe
push eax
lea eax, [ecx + esi]
push eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov esi, dword [ebp + 8]
lea eax, [esi + esi]
sub edi, eax
xor eax, eax
mov word [edi], ax
mov eax, 0xffff
add word [0x1a02bb00], ax
add esp, 0xc
mov eax, dword [0x1a024064]
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
cmp eax, 0xffffffff
je 0x1a003604
mov esi, ebx
push 0
shl esi, 0xa
push esi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseek]
add esp, 0xc
cmp eax, esi
jne 0x1a0035fa
push 0x400
push 0x1a02bb00
push dword [0x1a024064]
call edi
add esp, 0xc
cmp eax, 0x400
jne 0x1a0035fa
mov dword [0x1a02bf00], ebx
jmp 0x1a00360c
mov dword [0x1a02bf00], 0
test ebx, ebx
jne 0x1a00351b
cmp word [0x1a02bb00], 0
jne 0x1a003648
mov esi, dword [ebp - 0xc]
test esi, esi
je 0x1a003648
mov ecx, esi
call fcn.1a002eb0
cmp eax, esi
jne 0x1a003648
xor eax, eax
mov ecx, esi
mov word [0x1a02bb02], ax
call fcn.1a002f20
cmp eax, esi
jne 0x1a003648
sub ebx, dword [0x1a02baf4]
mov byte [ebx + 0x1a02b725], 0
dec dword [0x1a02b714]
push 0
push 0
push dword [0x1a024064]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseek]
add esp, 0xc
test eax, eax
jne 0x1a00351b
push 0x400
push 0x1a02b6f0
push dword [0x1a024064]
call edi
add esp, 0xc
cmp eax, 0x400
jne 0x1a00351b
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret