Function at 0x1a002f80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 8]
mov eax, ecx
push esi
mov dword [ebp - 0x10], edx
xor esi, esi
push edi
mov edx, ebx
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], esi
call fcn.1a002bb0
mov edx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseek]
mov edi, eax
mov dword [ebp - 4], eax
test edi, edi
je 0x1a00313c
mov dword [ebp - 0x14], 0x2ba3
nop word [eax + eax]
cmp dword [0x1a024064], 0xffffffff
jne 0x1a002fcd
xor eax, eax
jmp 0x1a003027
cmp edi, dword [0x1a02bf00]
je 0x1a003022
mov esi, edi
push 0
shl esi, 0xa
push esi
push dword [0x1a024064]
call edx
add esp, 0xc
cmp eax, esi
jne 0x1a003014
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 0x1a003014
mov dword [0x1a02bf00], edi
jmp 0x1a00302f
mov dword [0x1a02bf00], 0
xor eax, eax
jmp 0x1a003027
mov eax, dword [0x1a02bf00]
cmp eax, edi
jne 0x1a003195
xor edx, edx
movzx ecx, word [0x1a02bb00]
mov eax, 0x1fe
div ebx
mov dword [ebp - 8], eax
cmp ecx, eax
jae 0x1a00311f
mov edx, dword [ebp + 8]
mov edi, 0x1a02bb04
imul ecx, edx
xor esi, esi
lea ebx, [ecx*2 + 0x1a02bb04]
cmp ebx, edi
jbe 0x1a0030dc
lea ecx, [edx + edx]
nop word [eax + eax]
mov eax, 0x5400
add ax, word [edi]
cmp ax, word [ebp - 0x14]
ja 0x1a003098
test esi, esi
jne 0x1a0030a6
push edx
push edi
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncmp]
mov edx, dword [ebp + 8]
add esp, 0xc
test eax, eax
cmove esi, edi
lea edi, [edi + edx*2]
lea ecx, [edx + edx]
cmp edi, ebx
jb 0x1a003070
test esi, esi
je 0x1a0030d9
cmp edi, ebx
jae 0x1a0030c0
sub ebx, edi
lea eax, [ecx + edi]
and ebx, 0xfffffffe
push ebx
push edi
push eax
call sub.VCRUNTIME140.dll_memmove
mov edx, dword [ebp + 8]
add esp, 0xc
lea eax, [edx + edx]
push eax
push dword [ebp - 0x10]
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
inc word [0x1a02bb00]
jmp 0x1a003111
mov eax, dword [ebp - 8]
lea ecx, [eax - 1]
movzx eax, word [0x1a02bb00]
cmp eax, ecx
jae 0x1a003119
lea esi, [edx + edx]
push esi
push dword [ebp - 0xc]
push ebx
call sub.VCRUNTIME140.dll_memcpy
push esi
push dword [ebp - 0x10]
lea eax, [esi + ebx]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0x18
mov esi, edi
add word [0x1a02bb00], 2
test esi, esi
jne 0x1a00319e
mov edi, dword [ebp - 4]
mov ebx, dword [ebp + 8]
mov edx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__lseek]
mov esi, edi
movzx edi, word [0x1a02bb02]
mov dword [ebp - 8], esi
mov dword [ebp - 4], edi
test edi, edi
jne 0x1a002fc0
xor edi, edi
nop
cmp byte [edi + 0x1a02b725], 0
je 0x1a003216
cmp byte [edi + 0x1a02b726], 0
je 0x1a003215
cmp byte [edi + 0x1a02b727], 0
je 0x1a003210
cmp byte [edi + 0x1a02b728], 0
je 0x1a00320b
cmp byte [edi + 0x1a02b729], 0
je 0x1a003206
cmp byte [edi + 0x1a02b72a], 0
je 0x1a003201
add edi, 6
cmp edi, 0x3cc
jl 0x1a003140
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x1a024064]
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
mov edi, dword [ebp - 4]
cmp eax, 0xffffffff
je 0x1a0031f8
mov esi, edi
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 0x1a0031ee
push 0x400
push 0x1a02bb00
push dword [0x1a024064]
call ebx
add esp, 0xc
cmp eax, 0x400
jne 0x1a0031ee
mov dword [0x1a02bf00], edi
jmp 0x1a003335
mov dword [0x1a02bf00], 0
test edi, edi
jne 0x1a003195
jmp 0x1a003335
add edi, 5
jmp 0x1a003216
add edi, 4
jmp 0x1a003216
add edi, 3
jmp 0x1a003216
add edi, 2
jmp 0x1a003216
inc edi
cmp edi, 0x3cc
jge 0x1a003195
mov eax, dword [0x1a02baf4]
add eax, edi
mov dword [ebp - 4], eax
mov word [0x1a02bb02], ax
mov eax, dword [0x1a024064]
cmp eax, 0xffffffff
je 0x1a003280
push 0
shl esi, 0xa
push esi
push eax
call edx
add esp, 0xc
cmp eax, esi
jne 0x1a003276
push 0x400
push 0x1a02bb00
push dword [0x1a024064]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
add esp, 0xc
cmp eax, 0x400
jne 0x1a003276
mov eax, dword [ebp - 8]
mov dword [0x1a02bf00], eax
jmp 0x1a00328a
mov dword [0x1a02bf00], 0
cmp dword [ebp - 8], 0
jne 0x1a003195
push 0x3fc
push 0
push 0x1a02bb04
mov byte [edi + 0x1a02b725], 0x64
call sub.VCRUNTIME140.dll_memset
lea esi, [ebx + ebx]
mov dword [0x1a02bb00], 2
push esi
push dword [ebp - 0xc]
push 0x1a02bb04
call sub.VCRUNTIME140.dll_memcpy
push esi
push dword [ebp - 0x10]
lea eax, [esi + 0x1a02bb04]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [0x1a024064]
add esp, 0x24
mov edi, dword [ebp - 4]
cmp eax, 0xffffffff
je 0x1a003327
mov esi, edi
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 0x1a00331d
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
push 0x400
push 0x1a02bb00
push dword [0x1a024064]
call ebx
add esp, 0xc
cmp eax, 0x400
jne 0x1a00331d
mov dword [0x1a02bf00], edi
jmp 0x1a003335
mov dword [0x1a02bf00], 0
test edi, edi
jne 0x1a003195
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__write]
inc 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 0x1a003195
push 0x400
push 0x1a02b6f0
push dword [0x1a024064]
call ebx
add esp, 0xc
cmp eax, 0x400
jne 0x1a003195
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret