Function at 0x462bd0
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, 0x1021c
call fcn.004e88a0
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0x10]
push esi
push edi
mov dword [esp + 0x1c], ebx
call fcn.00419340
cmp eax, 1
sete al
cmp dword [0x51eb44], 0
mov byte [esp + 0x13], al
je 0x462d72
mov esi, dword [ebp + 0xc]
test al, al
jne 0x462c4e
mov ecx, esi
call fcn.0047f000
test al, al
je 0x462c4e
mov eax, dword [0x51b98c]
test byte [eax + 0x100], 1
jne 0x462c47
mov ecx, dword [0x51eabc]
push 1
push 0
push 0xffffffffffffffff
push 0x5068e4
call fcn.004b3e10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, ebx
jmp 0x462e08
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 0x462c1a
mov edx, dword [ebp + 8]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x462c73
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 + 0x28]
push eax
call fcn.004cc730
add esp, 0xc
lea eax, [esp + 0x20]
push eax
call fcn.004da061
add esp, 4
lea eax, [esp + 0x20]
push 0xa
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x462d67
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x462d67
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x462d67
cmp dword [esi], 0x4034b50
mov eax, dword [sym.imp.KERNEL32.dll_SizeofResource]
jne 0x462d44
push 0
push ebx
push 0
call eax
push eax
lea edx, [esp + 0x1c]
mov ecx, esi
call fcn.004b2fd0
add esp, 8
test eax, eax
je 0x462d3f
mov esi, dword [esp + 0x14]
lea ecx, [esp + 0x18]
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.004cfed0
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x462dcf
mov eax, dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0
lea ecx, [esp + 0x1c]
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 0x462dcf
push edi
xor bl, bl
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x462dcf
push 0
lea eax, [esp + 0x22c]
push eax
push 0x8000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFullPathNameW]
push dword [0x52174c]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
call esi
movzx eax, byte [esp + 0x13]
xor eax, 1
push eax
lea eax, [esp + 0x22c]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
mov ecx, 0x4f03e8
mov eax, dword [0x51d3e8]
setne bl
test eax, eax
je 0x462dcc
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call esi
test bl, bl
je 0x462df2
mov ecx, dword [0x51eabc]
push 1
push 0
push 0xffffffffffffffff
push 0x4f04b0
call fcn.004b3e10
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [0x51b98c]
test byte [eax + 0x100], 1
je 0x462c28
mov ecx, dword [esp + 0x1c]
push 0x4f03e8
push 0
push 0x5068e4
call fcn.0044d520
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc