Function at 0x45aa10
Capabilities:
Copy file
Extract resource via kernel32 functions
Set current directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x1000c
call fcn.004d2340
push ebx
push esi
mov esi, dword [ebp + 0x10]
mov ebx, ecx
push edi
mov ecx, esi
mov dword [esp + 0x14], ebx
call fcn.00404cf0
test al, al
je 0x45aa46
push 0x10
push 0
push esi
call fcn.004bb6a0
add esp, 0xc
jmp 0x45aa4f
push esi
call fcn.004bb722
add esp, 4
cmp dword [0x507b14], 0
mov esi, eax
je 0x45abdf
cmp esi, 1
mov esi, dword [ebp + 0xc]
je 0x45aaba
mov ecx, esi
call fcn.00471680
test al, al
je 0x45aaba
mov eax, dword [0x50499c]
test byte [eax + 0x100], 1
jne 0x45aa9e
mov ecx, dword [0x507a8c]
push 1
push 0
push 0xffffffffffffffff
push 0x4f07d4
call fcn.0049fde0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0x4da3cc
push 0
push 0x4f07d4
mov ecx, ebx
call fcn.004472d0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x45aa71
mov edx, dword [ebp + 8]
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x45aae0
sub ecx, esi
mov eax, 0x103
sar ecx, 1
cmp ecx, 0x104
cmovae ecx, eax
lea eax, [ecx*2 + 2]
push eax
push edx
lea eax, [esp + 0x20]
push eax
call fcn.004b9800
add esp, 0xc
lea eax, [esp + 0x18]
push eax
call fcn.004c4c7d
add esp, 4
lea eax, [esp + 0x18]
push 0xa
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x45abd4
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x45abd4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x45abd4
cmp dword [esi], 0x4034b50
mov eax, dword [sym.imp.KERNEL32.dll_SizeofResource]
jne 0x45abb1
push 0
push ebx
push 0
call eax
push eax
lea edx, [esp + 0x14]
mov ecx, esi
call fcn.0049f130
add esp, 8
test eax, eax
je 0x45abac
mov esi, dword [esp + 0xc]
lea ecx, [esp + 0x10]
push 0
push ecx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push esi
setne bl
call fcn.004bb7ab
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x45ac36
mov eax, dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0
lea ecx, [esp + 0x14]
push ecx
push ebx
push 0
call eax
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push edi
setne bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x45ac36
push edi
xor bl, bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x45ac36
push 0
lea eax, [esp + 0x1c]
push eax
push 0x8000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
push dword [0x50a70c]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call edi
xor eax, eax
cmp esi, 1
setne al
push eax
lea eax, [esp + 0x1c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
mov ecx, 0x4da3cc
mov eax, dword [0x506390]
setne bl
test eax, eax
je 0x45ac33
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call edi
mov ecx, dword [esp + 0x14]
xor bl, 1
movzx eax, bl
push eax
call fcn.00447370
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc