Function at 0x10001bb0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x54
push ebx
push ebp
push esi
mov eax, dword [esp + 0x64]
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push 1
mov esi, ecx
push 0x80000000
push eax
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x10001bed
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret 4
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea ecx, [esp + 0x68]
push edi
push ecx
lea edx, [esp + 0x44]
push 6
push edx
push ebp
call ebx
lea ecx, [esp + 0x3c]
mov eax, 0x10004064
mov dx, word [ecx]
cmp dx, word [eax]
je 0x10001c20
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x54
ret 4
lea eax, [esp + 0x68]
push edi
push eax
lea ecx, [esp + 0x54]
push 7
push ecx
push ebp
call ebx
mov cl, byte [esp + 0x50]
mov edx, dword [esp + 0x4c]
and ecx, 7
mov eax, dword [esp + 0x4e]
mov dword [esi + 8], edi
inc ecx
mov edi, 1
mov dword [esp + 0x34], ecx
shl edi, cl
and edx, 0xffff
and eax, 0xffff
mov dword [esi], edx
mov dword [esi + 4], eax
lea ecx, [edi*4]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
mov al, byte [esp + 0x54]
add esp, 4
mov dword [esp + 0x38], esi
test al, 0x80
je 0x10001d07
xor eax, eax
test edi, edi
mov dword [esp + 0x10], eax
jle 0x10001cd1
lea edx, [esp + 0x68]
push 0
push edx
lea eax, [esi + eax*4 + 2]
push 1
push eax
push ebp
call ebx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x68]
push 0
push ecx
lea eax, [esi + edx*4 + 1]
push 1
push eax
push ebp
call ebx
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x68]
push 0
push ecx
lea eax, [esi + edx*4]
push 1
push eax
push ebp
call ebx
mov eax, dword [esp + 0x10]
inc eax
cmp eax, edi
mov dword [esp + 0x10], eax
jl 0x10001c8a
mov eax, dword [esp + 0x51]
mov ecx, dword [esp + 0x1c]
and eax, 0xff
xor edx, edx
mov dword [ecx + 0x14], eax
mov esi, dword [esi + eax*4]
mov eax, esi
mov dword [esp + 0x30], esi
mov dl, byte [esp + 0x32]
and eax, 0xff
shl eax, 0x10
or edx, eax
and esi, 0xff00
or edx, esi
mov dword [ecx + 0x18], edx
jmp 0x10001d3b
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [ecx + 0x14], 0xffffffff
mov byte [esi + eax*4], al
mov eax, dword [esp + 0x10]
mov byte [esi + eax*4 + 1], al
mov eax, dword [esp + 0x10]
mov byte [esi + eax*4 + 2], al
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 0x100
mov dword [esp + 0x10], eax
jl 0x10001d18
xor eax, eax
lea edx, [esp + 0x68]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
push eax
push edx
lea eax, [esp + 0x34]
push 1
push eax
push ebp
call ebx
mov eax, dword [esp + 0x2c]
cmp eax, 0x21
jne 0x10001e00
lea ecx, [esp + 0x68]
push 0
push ecx
lea edx, [esp + 0x2c]
push 1
push edx
push ebp
call ebx
cmp dword [esp + 0x24], 0xf9
je 0x10001dd0
lea eax, [esp + 0x68]
push 0
push eax
lea ecx, [esp + 0x28]
push 1
push ecx
push ebp
mov dword [esp + 0x34], 0
call ebx
test eax, eax
je 0x10002086
mov eax, dword [esp + 0x20]
test eax, eax
jle 0x10002086
push 1
push 0
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x68]
push 0
push edx
lea eax, [esp + 0x28]
push 1
push eax
push ebp
call ebx
test eax, eax
jne 0x10001d9e
jmp 0x10002086
lea ecx, [esp + 0x68]
push 0
push ecx
lea edx, [esp + 0x4c]
push 5
push edx
push ebp
call ebx
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x68]
inc ecx
push 0
mov dword [esp + 0x1c], ecx
push eax
lea ecx, [esp + 0x2c]
push 1
push ecx
push ebp
call ebx
jmp 0x10002086
cmp eax, 0x2c
jne 0x10002081
push 0x30
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
xor ecx, ecx
add esp, 4
cmp eax, ecx
je 0x10001e2a
mov edi, eax
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x2c], ecx
mov dword [esp + 0x28], edi
jmp 0x10001e30
mov dword [esp + 0x28], ecx
mov edi, ecx
lea edx, [esp + 0x68]
push ecx
push edx
lea eax, [esp + 0x60]
push 9
push eax
push ebp
call ebx
mov eax, dword [esp + 0x60]
and eax, 0xff
mov esi, eax
shr esi, 7
je 0x10001e56
and eax, 7
inc eax
jmp 0x10001e5a
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x5e]
mov edx, dword [esp + 0x5c]
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
mov ecx, edi
call fcn.100015d0
mov eax, dword [esp + 0x58]
and eax, 0xffff
mov dword [edi + 0x1c], eax
mov ecx, dword [esp + 0x5a]
mov eax, dword [esp + 0x18]
and ecx, 0xffff
test eax, eax
mov dword [edi + 0x20], ecx
je 0x10001ecf
test byte [esp + 0x45], 1
je 0x10001eab
mov eax, dword [esp + 0x48]
and eax, 0xff
jmp 0x10001eae
or eax, 0xffffffff
mov dword [edi + 0x18], eax
mov eax, dword [esp + 0x46]
and eax, 0xffff
lea edx, [eax + eax*4]
shl edx, 1
mov dword [edi + 0x24], edx
mov al, byte [esp + 0x45]
shr eax, 2
and eax, 7
mov dword [edi + 0x28], eax
test esi, esi
je 0x10001ef1
lea ecx, [esp + 0x68]
push 0
push ecx
mov ecx, dword [edi + 8]
mov edx, 1
mov eax, dword [edi + 0x10]
shl edx, cl
shl edx, 2
push edx
push eax
push ebp
call ebx
jmp 0x10001f19
mov ecx, dword [edi + 8]
mov edx, 1
shl edx, cl
mov esi, dword [esp + 0x38]
mov edi, dword [edi + 0x10]
shl edx, 2
mov ecx, edx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0x68]
push 0
push ecx
lea edx, [esp + 0x38]
push 1
push edx
push ebp
mov dword [esp + 0x44], 0
call ebx
push 1
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x28], eax
mov esi, eax
lea eax, [esp + 0x68]
push 0
push eax
lea ecx, [esp + 0x18]
push 1
push ecx
push ebp
mov dword [esp + 0x24], 0
call ebx
test eax, eax
je 0x10001f8f
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x10001f8f
lea esi, [esi + eax + 1]
push 0
push 0
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea edx, [esp + 0x68]
push 0
push edx
lea eax, [esp + 0x18]
push 1
push eax
push ebp
call ebx
test eax, eax
jne 0x10001f62
mov ecx, dword [esp + 0x28]
push 0
push 0
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
sub esi, dword [esp + 0x28]
add esi, 4
push esi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
lea edx, [esp + 0x68]
mov dword [esp + 0x28], eax
mov esi, eax
push 0
push edx
lea eax, [esp + 0x1c]
push 1
push eax
push ebp
mov dword [esp + 0x28], 0
call ebx
test eax, eax
je 0x10002001
mov eax, dword [esp + 0x14]
test eax, eax
jle 0x10002001
lea ecx, [esp + 0x68]
push 0
push ecx
push eax
push esi
push ebp
call ebx
mov edx, dword [esp + 0x14]
push 0
add esi, edx
lea edx, [esp + 0x6c]
push edx
lea eax, [esp + 0x1c]
push 1
push eax
push ebp
call ebx
test eax, eax
jne 0x10001fd2
mov cl, byte [esp + 0x60]
mov edx, dword [esp + 0x5e]
mov eax, dword [esp + 0x5c]
mov esi, dword [esp + 0x28]
shr ecx, 6
and ecx, 1
and edx, 0xffff
push ecx
mov ecx, dword [edi + 0x14]
and eax, 0xffff
push edx
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [edi + 0xc]
push ecx
push edx
push eax
push esi
call fcn.100020e0
add esp, 0x1c
mov dword [esp + 0x10], eax
test eax, eax
je 0x1000204f
mov ecx, dword [esp + 0x1c]
push edi
call fcn.100016f0
jmp 0x1000206e
test edi, edi
je 0x1000206e
mov ecx, dword [edi + 0x2c]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov edx, dword [edi + 0xc]
push edx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0xc
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov dword [esp + 0x18], 0
jmp 0x10002086
cmp eax, 0x3b
je 0x100020bf
lea eax, [esp + 0x68]
push 0
push eax
lea ecx, [esp + 0x18]
push 1
push ecx
push ebp
mov dword [esp + 0x24], 0
call ebx
test eax, eax
je 0x100020bf
cmp dword [esp + 0x68], 1
jne 0x100020bf
push 1
push 0
push 0xffffffffffffffff
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x10001d3b
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov eax, dword [edx + 0x10]
pop ebx
add esp, 0x54
ret 4