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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1009c71b
mov eax, dword fs:[0]
push eax
sub esp, 0xd4
mov eax, dword [0x100a20a4]
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 0x100460d0
mov eax, dword [ebx]
push 1
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x100a8504]
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 0x10045e80
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
je 0x10046114
add esi, dword [ebp - 0xa8]
jmp 0x10045e4a
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 0x100460a5
cmp dword [ebp - 0x98], 8
jae 0x10045f2a
push 0x28
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
je 0x1004613d
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 0x10045f22
test ecx, ecx
je 0x10045f22
sub ecx, dword [ecx - 4]
je 0x10045f22
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0xa0], edi
jmp 0x10045f30
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 0x10045f82
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
je 0x10046162
add esi, dword [ebp - 0xa8]
mov dword [ebp - 0xac], esi
mov ecx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0xa0]
jmp 0x10045f43
mov ebx, dword [edi + 4]
cmp ebx, dword [ebp - 0x98]
jbe 0x10046035
test ebx, ebx
je 0x10045fe6
lea eax, [ebx + 0x20]
test eax, eax
je 0x10045fb6
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edx, eax
test edx, edx
jne 0x10045fb8
mov dword [ebp - 0xcc], eax
jmp 0x1004618b
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 0x10045ff0
xor eax, eax
mov dword [ebp - 0xa4], eax
xor edx, edx
mov dword [ebp - 0xcc], eax
test edx, edx
je 0x1004618b
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 0x10046029
test ecx, ecx
je 0x10046029
sub ecx, dword [ecx - 4]
je 0x10046029
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 0x100461a6
cmp esi, ebx
jae 0x10046089
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
je 0x100461c1
add esi, dword [ebp - 0xdc]
mov dword [ebp - 0xac], esi
mov ebx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0xa0]
jmp 0x10046044
mov ebx, dword [ebp - 0xb0]
mov eax, dword [ebx]
push edi
mov esi, dword [eax]
mov ecx, esi
call dword [0x100a8504]
mov ecx, ebx
call esi
jmp 0x10045ea4
mov byte [ebp - 4], 0
lea eax, [ebp - 0x94]
mov ecx, dword [ebp - 0xa0]
cmp ecx, eax
je 0x100460c9
test ecx, ecx
je 0x100460c9
sub ecx, dword [ecx - 4]
je 0x100460c9
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.1009b610
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10046126
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xb4], eax
push 0x100a19e0
lea eax, [ebp - 0xb4]
push eax
call sub.msvcrt.dll__CxxThrowException
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xc4], 0x8007000e
push 0x100a19e0
lea eax, [ebp - 0xc4]
push eax
call sub.msvcrt.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10046174
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xc8], eax
push 0x100a19e0
lea eax, [ebp - 0xc8]
push eax
call sub.msvcrt.dll__CxxThrowException
mov dword [ebp - 0xd0], 0x8007000e
push 0x100a19e0
lea eax, [ebp - 0xd0]
push eax
call sub.msvcrt.dll__CxxThrowException
mov dword [ebp - 0xd4], 0x80004005
push 0x100a19e0
lea eax, [ebp - 0xd4]
push eax
call sub.msvcrt.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100461d3
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xd8], eax
push 0x100a19e0
lea eax, [ebp - 0xd8]
push eax
call sub.msvcrt.dll__CxxThrowException
int3