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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100a25b0
mov eax, dword fs:[0]
push eax
sub esp, 0xbc
mov eax, dword [0x100a80a4]
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 - 0xa8], ebx
cmp byte [ebx + 0x38], 0
mov edi, dword [ebp + 8]
mov dword [ebp - 0xc8], ebx
je 0x1004749e
mov eax, dword [ebx]
push 1
mov esi, dword [eax + 0xc]
mov ecx, esi
call dword [0x100ae518]
mov ecx, ebx
call esi
mov dword [ebp - 4], 0
xor esi, esi
lea ebx, [ebx]
mov ecx, dword [edi + 4]
cmp esi, ecx
jae 0x10047280
push 0
lea edx, [ebp - 0xa4]
sub ecx, esi
push edx
push ecx
lea eax, [edi + esi]
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100474bc
add esi, dword [ebp - 0xa4]
jmp 0x10047250
lea edi, [ebp - 0x94]
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x98], 0x80
mov byte [ebp - 4], 1
cmp byte [ebx + 0x39], 0
je 0x1004747e
cmp dword [ebp - 0x98], 8
jae 0x10047319
push 0x28
call fcn.1000efa0
mov edx, eax
add esp, 4
test edx, edx
je 0x100474e5
and eax, 0x1f
mov ecx, 0x20
sub ecx, eax
mov dword [edx + ecx - 4], ecx
push dword [ebp - 0x9c]
push dword [ebp - 0xa0]
lea edi, [edx + ecx]
push edi
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0xa0]
lea eax, [ebp - 0x94]
add esp, 0xc
cmp ecx, eax
je 0x10047313
test ecx, ecx
je 0x10047313
sub ecx, dword [ecx - 4]
je 0x10047313
push ecx
call fcn.1000efc0
add esp, 4
mov dword [ebp - 0xa0], edi
mov ecx, 8
xor esi, esi
mov dword [ebp - 0x9c], ecx
cmp esi, ecx
jae 0x1004735f
push 0
lea edx, [ebp - 0xa4]
sub ecx, esi
push edx
push ecx
lea eax, [edi + esi]
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10047500
add esi, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0xa0]
jmp 0x10047326
mov ebx, dword [edi + 4]
cmp ebx, dword [ebp - 0x98]
jbe 0x100473e8
test ebx, ebx
je 0x10047529
lea eax, [ebx + 0x20]
test eax, eax
je 0x1004738e
push eax
call fcn.1000efa0
mov edx, eax
add esp, 4
test edx, edx
je 0x10047529
jmp 0x10047390
xor edx, edx
mov eax, edx
mov ecx, 0x20
and eax, 0x1f
sub ecx, eax
mov dword [edx + ecx - 4], ecx
lea edi, [edx + ecx]
test edi, edi
je 0x10047529
push dword [ebp - 0x9c]
push dword [ebp - 0xa0]
push edi
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0xa0]
lea eax, [ebp - 0x94]
add esp, 0xc
cmp ecx, eax
je 0x100473e2
test ecx, ecx
je 0x100473e2
sub ecx, dword [ecx - 4]
je 0x100473e2
push ecx
call fcn.1000efc0
add esp, 4
mov dword [ebp - 0xa0], edi
mov dword [ebp - 0x9c], ebx
cmp ebx, 8
jb 0x10047544
cmp esi, ebx
jae 0x10047436
push 0
lea ecx, [ebp - 0xc4]
sub ebx, esi
push ecx
push ebx
lea eax, [edi + esi]
push eax
mov eax, dword [ebp - 0xa8]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1004755f
add esi, dword [ebp - 0xc4]
mov ebx, dword [ebp - 0x9c]
mov edi, dword [ebp - 0xa0]
jmp 0x100473f7
mov ebx, dword [ebp - 0xa8]
push edi
mov eax, dword [ebx]
mov esi, dword [eax]
mov ecx, esi
call dword [0x100ae518]
mov ecx, ebx
call esi
mov edi, dword [ebp - 0xa0]
jmp 0x100472a4
lea eax, [ebp - 0x94]
mov byte [ebp - 4], 0
cmp edi, eax
je 0x1004749e
test edi, edi
je 0x1004749e
sub edi, dword [edi - 4]
je 0x1004749e
push edi
call fcn.1000efc0
add esp, 4
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.100a1500
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100474ce
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xac], eax
lea eax, [ebp - 0xac]
push 0x100a7210
push eax
call sub.msvcrt.dll__CxxThrowException
push 0x100a7210
lea eax, [ebp - 0xb0]
mov dword [ebp - 0xb0], 0x8007000e
push eax
call sub.msvcrt.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10047512
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xb4], eax
lea eax, [ebp - 0xb4]
push 0x100a7210
push eax
call sub.msvcrt.dll__CxxThrowException
push 0x100a7210
lea eax, [ebp - 0xb8]
mov dword [ebp - 0xb8], 0x8007000e
push eax
call sub.msvcrt.dll__CxxThrowException
push 0x100a7210
lea eax, [ebp - 0xbc]
mov dword [ebp - 0xbc], 0x80004005
push eax
call sub.msvcrt.dll__CxxThrowException
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10047571
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0xc0], eax
lea eax, [ebp - 0xc0]
push 0x100a7210
push eax
call sub.msvcrt.dll__CxxThrowException
int3