Function at 0x10003f69
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 0x14]
xor eax, eax
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], eax
push esi
mov esi, eax
mov dword [ebp - 0xc], esi
push edi
mov edi, eax
mov dword [ebp - 8], edi
test ebx, ebx
jne 0x10003f9f
mov dword [ebp - 4], 0x80070057
jmp 0x10004066
push eax
push 0x8000000
push 3
push eax
push 3
push 0x80000000
push 0x1000a7c0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebx], eax
cmp eax, 0xffffffff
jne 0x10003fcb
mov eax, 0x8004010f
jmp 0x100040e8
push 0
lea ecx, [ebp - 0x1c]
push ecx
push 3
lea ecx, [ebp - 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10003ff2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov dword [ebp - 4], ebx
jmp 0x10004180
mov edx, 0x10001130
lea ecx, [ebp - 0x14]
movzx eax, word [ecx]
cmp ax, word [edx]
jne 0x1000400b
movzx eax, byte [ecx + 2]
cmp al, byte [edx + 2]
je 0x1000401d
xor eax, eax
push eax
push eax
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x10003fe2
mov edx, dword [ebp + 8]
lea eax, [ebp - 8]
mov ecx, dword [ebx]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.1000310a
mov esi, dword [ebp - 0xc]
mov ebx, eax
mov dword [ebp - 4], ebx
test ebx, ebx
jne 0x10004060
imul eax, esi, 0x14
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ecx, eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], ecx
mov dword [eax], ecx
test ecx, ecx
jne 0x100040f1
mov dword [ebp - 4], 0x8007000e
mov edi, dword [ebp - 8]
mov ebx, dword [ebp + 0x14]
cmp dword [ebx], 0xffffffff
je 0x10004076
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebx], 0xffffffff
test edi, edi
je 0x10004094
xor ebx, ebx
test esi, esi
je 0x10004094
cmp dword [edi + ebx*4], 0
je 0x1000408f
push dword [edi + ebx*4]
call dword [sym.imp.KERNEL32.dll_LocalFree]
inc ebx
cmp ebx, esi
jb 0x10004080
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x100040cd
test esi, esi
je 0x100040c0
lea eax, [ebx + 0x10]
mov dword [ebp - 0x18], eax
mov ecx, dword [eax]
test ecx, ecx
je 0x100040b5
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x18]
add eax, 0x14
mov dword [ebp - 0x18], eax
sub esi, 1
jne 0x100040a5
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp + 0xc]
and dword [eax], 0
mov ebx, dword [ebp - 4]
test edi, edi
je 0x100040db
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edx, dword [ebp - 0x10]
push ecx
xor ecx, ecx
call fcn.10003ca0
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [ebp - 0x10]
push 0x1d
add eax, 4
pop edx
and dword [eax], edi
lea eax, [eax + 0x14]
sub edx, 1
jne 0x100040fa
mov edi, dword [ebp - 8]
xor eax, eax
mov dword [ebp - 0xc], eax
test esi, esi
je 0x1000417b
mov ebx, dword [ebp - 0x10]
lea edx, [ecx + 0xc]
mov dword [ebp - 8], edx
mov ecx, dword [edi + eax*4]
test ecx, ecx
je 0x1000416a
cmp byte [ecx], 0
je 0x1000416a
call fcn.10001c26
mov ecx, dword [ebp - 8]
mov edx, ebx
push ecx
mov dword [ecx + 4], eax
mov ecx, eax
call fcn.10003ca0
mov edx, dword [ebp - 8]
cmp eax, 0xffffffff
je 0x10004167
imul ecx, eax, 0x14
mov eax, dword [ecx + ebx + 0xc]
mov dword [edx], eax
mov eax, dword [ecx + ebx + 8]
mov dword [edx - 4], eax
mov dword [edx - 8], 1
mov eax, dword [ecx + ebx]
mov dword [edx - 0xc], eax
mov dword [ecx + ebx + 4], 1
mov eax, dword [ebp - 0xc]
inc eax
add edx, 0x14
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], edx
cmp eax, esi
jb 0x10004119
mov ebx, dword [ebp - 4]
mov eax, dword [ebp + 0x10]
mov dword [eax], esi
test ebx, ebx
je 0x100040d0
jmp 0x10004063