Function at 0x100466d0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a0e3b
mov eax, dword fs:[0]
push eax
sub esp, 0xd4
mov eax, dword [0x100a70b4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0xb0], ebx
mov dword [ebp - 0xe0], ebx
mov edi, dword [ebp + 8]
cmp byte [ebx + 0x38], 0
je 0x100469ed
mov eax, dword [ebx]
push 1
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x100ad4e8]
mov ecx, ebx
call esi
mov dword [ebp - 4], 0
xor esi, esi
mov dword [ebp - 0xb8], esi
mov ecx, dword [edi + 4]
cmp esi, ecx
jae 0x1004677f
lea eax, [edi + esi]
push 0
lea edx, [ebp - 0xa8]
push edx
sub ecx, esi
push ecx
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x10046777
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x10046a31
jmp 0x10046a39
add esi, dword [ebp - 0xa8]
jmp 0x1004673a
lea eax, [ebp - 0x94]
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x98], 0x80
mov byte [ebp - 4], 1
cmp byte [ebx + 0x39], 0
je 0x100469c2
cmp dword [ebp - 0x98], 8
jae 0x10046829
push 0x28
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
je 0x10046a50
mov dword [ebp - 0xbc], eax
mov ecx, eax
and ecx, 0x1f
mov edx, 0x20
sub edx, ecx
lea edi, [eax + edx]
mov dword [ebp - 0xbc], edi
mov dword [edi - 4], edx
mov dword [ebp - 0xc0], edi
push dword [ebp - 0x9c]
push dword [ebp - 0xa0]
push edi
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x94]
mov ecx, dword [ebp - 0xa0]
cmp ecx, eax
je 0x10046821
test ecx, ecx
je 0x10046821
sub ecx, dword [ecx - 4]
je 0x10046821
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0xa0], edi
jmp 0x1004682f
mov edi, dword [ebp - 0xa0]
mov ecx, 8
mov dword [ebp - 0x9c], ecx
xor esi, esi
mov dword [ebp - 0xac], esi
cmp esi, ecx
jae 0x10046890
lea eax, [edi + esi]
push 0
lea edx, [ebp - 0xa8]
push edx
sub ecx, esi
push ecx
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10046876
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x10046a75
jmp 0x10046a7d
add esi, dword [ebp - 0xa8]
mov dword [ebp - 0xac], esi
mov ecx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0xa0]
jmp 0x10046842
mov ebx, dword [edi + 4]
cmp ebx, dword [ebp - 0x98]
jbe 0x10046943
test ebx, ebx
je 0x100468f4
lea eax, [ebx + 0x20]
test eax, eax
je 0x100468c4
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, eax
test edx, edx
jne 0x100468c6
mov dword [ebp - 0xcc], eax
jmp 0x10046a94
xor edx, edx
mov dword [ebp - 0xa4], edx
mov eax, edx
and eax, 0x1f
mov ecx, 0x20
sub ecx, eax
lea eax, [edx + ecx]
mov dword [ebp - 0xa4], eax
mov dword [eax - 4], ecx
mov edx, eax
mov ecx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0xa0]
jmp 0x100468fe
xor eax, eax
mov dword [ebp - 0xa4], eax
xor edx, edx
mov dword [ebp - 0xcc], eax
test edx, edx
je 0x10046a94
push ecx
push edi
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x94]
mov ecx, dword [ebp - 0xa0]
cmp ecx, eax
je 0x10046937
test ecx, ecx
je 0x10046937
sub ecx, dword [ecx - 4]
je 0x10046937
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov edi, dword [ebp - 0xa4]
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x9c], ebx
cmp ebx, 8
jb 0x10046aaf
cmp esi, ebx
jae 0x100469a6
lea eax, [edi + esi]
push 0
lea ecx, [ebp - 0xdc]
push ecx
sub ebx, esi
push ebx
push eax
mov eax, dword [ebp - 0xb0]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1004698c
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x10046aca
jmp 0x10046ad2
add esi, dword [ebp - 0xdc]
mov dword [ebp - 0xac], esi
mov ebx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0xa0]
jmp 0x10046952
mov ebx, dword [ebp - 0xb0]
mov eax, dword [ebx]
push edi
mov esi, dword [eax]
mov ecx, esi
call dword [0x100ad4e8]
mov ecx, ebx
call esi
jmp 0x100467a3
mov byte [ebp - 4], 0
lea eax, [ebp - 0x94]
mov ecx, dword [ebp - 0xa0]
cmp ecx, eax
je 0x100469e6
test ecx, ecx
je 0x100469e6
sub ecx, dword [ecx - 4]
je 0x100469e6
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1009fbf0
mov esp, ebp
pop ebp
ret 4
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xb4], eax
push 0x100a6dc8
lea eax, [ebp - 0xb4]
push eax
call sub.msvcrt.dll__CxxThrowException
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xc4], 0x8007000e
push 0x100a6dc8
lea eax, [ebp - 0xc4]
push eax
call sub.msvcrt.dll__CxxThrowException
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xc8], eax
push 0x100a6dc8
lea eax, [ebp - 0xc8]
push eax
call sub.msvcrt.dll__CxxThrowException
mov dword [ebp - 0xd0], 0x8007000e
push 0x100a6dc8
lea eax, [ebp - 0xd0]
push eax
call sub.msvcrt.dll__CxxThrowException
mov dword [ebp - 0xd4], 0x80004005
push 0x100a6dc8
lea eax, [ebp - 0xd4]
push eax
call sub.msvcrt.dll__CxxThrowException
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xd8], eax
push 0x100a6dc8
lea eax, [ebp - 0xd8]
push eax
call sub.msvcrt.dll__CxxThrowException
int3