Function at 0x47f390
Capabilities:
Delete file
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ccfd8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push esi
push edi
mov eax, dword [0x504c94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 8]
mov eax, esp
mov dword [ebp - 0x20], esp
push ecx
push str.CPeContainer::CopyPeContainerToFile:__s
push eax
mov dword [ebp - 0x14], ebx
call fcn.00466a00
add esp, 0xc
call fcn.0047c750
mov edx, dword [ebp + 8]
push ebx
push 0x80
push 4
push ebx
push 3
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x10], edi
cmp edi, 0xffffffff
jne 0x47f45d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp + 0x10], esp
push eax
push str.CPeContainer::CopyPeContainerToFile:_creation_failed__LE_d
push ecx
call fcn.00466a00
add esp, 0xc
call fcn.0047c750
mov dword [ebp - 4], edi
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x47f444
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 7
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp + 0xc]
and ecx, dword [ebp + 0x10]
cmp ecx, 0xffffffff
jne 0x47f4e5
lea edx, [ebp - 0x1c]
push edx
push edi
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x47f482
or eax, eax
or ecx, 0xffffffff
jmp 0x47f485
mov ecx, dword [ebp - 0x1c]
push ebx
push eax
push ecx
push 2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
test ebx, ebx
jne 0x47f4c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp + 0x10], esp
push eax
push str.CPeContainer::CopyPeContainerToFile:_CreateFileMapping_failed__LE_d
push ecx
call fcn.00466a00
add esp, 0xc
call fcn.0047c750
mov dword [ebp - 0x14], 8
jmp 0x47f693
lea edx, [ebp + 0xc]
push edx
push ecx
mov ecx, edi
call fcn.0046a020
add esp, 4
push edx
push eax
push ebx
call fcn.0047c6b0
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esi + 8]
sub ebx, dword [esi + 0x18]
mov edi, dword [esi + 0xc]
sbb edi, dword [esi + 0x1c]
add ebx, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x10]
adc edi, dword [ebp + 0x10]
push 0
lea eax, [ebp - 0x18]
push eax
push ebx
push ecx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x18], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x47f53f
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, esp
mov dword [ebp + 0x10], esp
push eax
push str.CPeContainer::CopyPeContainerToFile:_SetFilePointer_1__failed__LE_d
push edx
call fcn.00466a00
add esp, 0xc
call fcn.0047c750
mov dword [ebp - 0x14], 0xc
jmp 0x47f690
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push 0
lea edx, [ebp - 0x18]
push edx
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x10]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x47f57c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov edx, esp
mov dword [ebp + 0x10], esp
push eax
push str.CPeContainer::CopyPeContainerToFile:_SetFilePointer_2__failed__LE_d
jmp 0x47f525
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
mov edx, dword [esi + 0x68]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x24], ecx
mov ecx, dword [esi + 0x1c]
push edx
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], ecx
call fcn.004ac152
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 0x10], edi
ja 0x47f684
jb 0x47f5b7
cmp dword [ebp + 0xc], ebx
jae 0x47f684
mov ecx, dword [esi + 0x68]
mov edx, dword [ebp - 0x28]
xor eax, eax
add ecx, edx
adc eax, dword [ebp - 0x24]
cmp eax, edi
ja 0x47f5d6
jb 0x47f5ce
cmp ecx, ebx
jae 0x47f5d6
mov eax, dword [esi + 0x68]
mov dword [ebp + 0x10], eax
jmp 0x47f5db
sub ebx, edx
mov dword [ebp + 0x10], ebx
mov eax, dword [ebp + 0x10]
mov ecx, dword [esi + 0x24]
cdq
push edx
mov ebx, eax
push ebx
mov dword [ebp - 0x2c], edx
mov edx, dword [esi + 0x20]
push ecx
push edx
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x30], eax
call fcn.0047ce30
test eax, eax
je 0x47f65d
mov eax, dword [esi + 0x28]
sub eax, dword [esi + 0x30]
mov ecx, dword [ebp - 0x1c]
add eax, dword [esi + 0x20]
push ebx
push eax
push ecx
call fcn.004abb70
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
add dword [esi + 0x20], ebx
push 0
lea edx, [ebp - 0x20]
adc dword [esi + 0x24], eax
mov eax, dword [ebp + 0x10]
push edx
mov edx, dword [ebp - 0x10]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x24]
add ecx, ebx
adc eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
ja 0x47f684
jb 0x47f655
cmp ecx, dword [ebp - 0x38]
jae 0x47f684
mov ebx, dword [ebp - 0x38]
jmp 0x47f5b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ecx
mov ecx, esp
mov dword [ebp + 0x10], esp
push eax
push str.CPeContainer::CopyPeContainerToFile:_Read_failed__LE_d
push ecx
call fcn.00466a00
add esp, 0xc
call fcn.0047c750
mov dword [ebp - 0x14], 8
mov edx, dword [ebp - 0x1c]
push edx
call fcn.004ac035
add esp, 4
mov edi, dword [ebp - 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x47f6ab
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47f6d1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc