Function at 0x41d585
Capabilities:
Delete file
Write file on windows

Disassembly:
push 0x34
mov eax, 0x47e91f
call fcn.00456992
mov esi, edx
mov dword [ebp - 0x34], esi
mov ebx, ecx
mov dword [ebp - 0x30], ebx
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x1f
push eax
push str.CopyResourceToFileOrBuffer
lea ecx, [ebp - 0x40]
call fcn.0041e6cc
xor edx, edx
mov dword [ebp - 4], edx
mov ecx, edx
or dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x18], edx
test ebx, ebx
je 0x41d7fe
mov edi, dword [ebp + 8]
test esi, esi
jne 0x41d5de
test edi, edi
jne 0x41d7fe
mov bl, byte [ebp + 0xc]
test bl, bl
je 0x41d5ed
test edi, edi
jne 0x41d7fe
cmp dword [ebp + 0x10], ecx
je 0x41d7fe
test edi, edi
jne 0x41d60c
test esi, esi
je 0x41d60c
mov ecx, esi
mov dword [ebp - 0x20], ecx
cmp word [esi], dx
je 0x41d7fe
cmp dword [0x4c2430], edx
jle 0x41d620
mov dword [ebp - 0x10], 0x2e3
jmp 0x41d805
test ecx, ecx
je 0x41d69f
movzx eax, bl
push 9
pop esi
lea eax, [eax*2 + 1]
mov dword [ebp - 0x2c], eax
push edx
push 0x80
push eax
push edx
push 5
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 0x1c]
cmp ecx, 0xffffffff
jne 0x41d68c
cmp eax, 0x20
je 0x41d665
cmp eax, 5
jne 0x41d67e
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub esi, 1
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x20]
push 0
pop edx
jns 0x41d634
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
jmp 0x41d805
test bl, bl
je 0x41d6af
push 2
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x41d6af
test edi, edi
je 0x41d6ac
mov esi, dword [edi]
mov dword [ebp - 0x24], esi
mov dword [edi], edx
jmp 0x41d6af
mov dword [ebp - 0x24], edx
push dword [0x4c2508]
call fcn.004640c6
mov ebx, eax
mov dword [ebp - 0x2c], ebx
pop ecx
test ebx, ebx
jne 0x41d6cd
mov dword [ebp - 0x10], 8
jmp 0x41d725
and dword [ebp - 0x10], 0
jmp 0x41d7cc
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x41d71c
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x41d7c3
cmp dword [ebp - 0x20], 0
je 0x41d781
push 0
lea eax, [ebp - 0x28]
push eax
push esi
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41d713
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x28]
je 0x41d7c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x2c]
call fcn.0045f917
pop ecx
mov eax, dword [ebp - 0x1c]
cmp eax, 0xffffffff
je 0x41d805
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0
je 0x41d805
push 9
pop edi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
jne 0x41d805
cmp eax, 0x20
je 0x41d76c
cmp eax, 5
jne 0x41d805
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
sub edi, 1
jns 0x41d745
jmp 0x41d805
mov ebx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x24]
lea eax, [esi + ebx]
cmp eax, edx
jbe 0x41d79a
mov esi, edx
push 0x7a
sub esi, ebx
pop ebx
mov dword [ebp - 0x10], ebx
jmp 0x41d79d
mov ebx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
push esi
push dword [ebp - 0x2c]
add eax, ecx
push eax
call fcn.00457890
add dword [ebp - 0x18], esi
add esp, 0xc
test edi, edi
je 0x41d7b8
add dword [edi], esi
test ebx, ebx
jne 0x41d71c
mov ebx, dword [ebp - 0x2c]
cmp dword [0x4c2430], 0
jg 0x41d7f2
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
and dword [ebp - 0x28], 0
push eax
push dword [0x4c2508]
push ebx
push dword [ebp - 0x30]
call dword [ebp + 0x10]
test eax, eax
jne 0x41d6d6
jmp 0x41d713
mov dword [ebp - 0x10], 0x2e3
jmp 0x41d71c
mov dword [ebp - 0x10], 0x57
mov esi, dword [ebp - 0x10]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x40]
call fcn.0041e740
mov eax, esi
call fcn.00456960
ret