Function at 0x4057c0
Capabilities:
Extract resource via kernel32 functions
Get common file path
Query environment variable
Set current directory

Disassembly:
sub esp, 0x210
mov eax, dword [0x43dd54]
xor eax, esp
mov dword [esp + 0x20c], eax
mov eax, dword [0x43fb6c]
push ebx
push 0xa
mov ebx, 1
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
jne 0x405805
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.00419eb3
add esp, 0x210
ret
mov ecx, dword [0x43fb6c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4057ed
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov ecx, 0x293
mov edi, 0x43f120
mov eax, 0x43f428
rep movsd dword es:[edi], dword [esi]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405836
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
sub eax, edx
sar eax, 1
jne 0x40585f
push 0x104
push 0x43f428
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x4058b1
xor eax, eax
movzx ecx, word [eax + 0x43f428]
mov word [esp + eax + 0x10], cx
add eax, 2
test cx, cx
jne 0x405861
push 0x104
push 0x43f428
lea edx, [esp + 0x18]
push edx
call esi
test eax, eax
jne 0x4058a4
lea ebx, [ebx]
movzx ecx, word [esp + eax + 0x10]
mov word [eax + 0x43f428], cx
add eax, 2
test cx, cx
jne 0x405890
push 0x43f428
call fcn.00404100
add esp, 4
mov eax, dword [0x43f848]
sub eax, 0
je 0x405a8d
sub eax, ebx
je 0x405a2c
sub eax, ebx
jne 0x405a42
mov eax, 0x43f220
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4058d7
sub eax, edx
sar eax, 1
jne 0x4059bd
push 0x104
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
xor ecx, ecx
lea eax, [esp + 0x10]
mov word [esp + 0x12], cx
add eax, 0xfffffffe
lea ebx, [ebx]
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x405910
mov edx, dword [str.:Temp]
mov ecx, dword [0x430f08]
mov dword [eax], edx
mov edx, dword [0x430f0c]
mov dword [eax + 4], ecx
mov cx, word [0x430f10]
mov dword [eax + 8], edx
mov word [eax + 0xc], cx
xor eax, eax
jmp 0x405950
movzx ecx, word [esp + eax + 0x10]
mov word [eax + 0x43f220], cx
add eax, 2
test cx, cx
jne 0x405950
push 0x43f220
call fcn.00404100
add esp, 4
test eax, eax
jne 0x405a3c
mov eax, 0x43f84c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405981
sub eax, edx
sar eax, 1
je 0x405b32
push str.Cannot_create_temporary_folder__please_repackage_with_a_specific_folder.
call fcn.0041bdca
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.00419eb3
add esp, 0x210
ret
xor eax, eax
nop
movzx ecx, word [eax + 0x43f220]
mov word [esp + eax + 0x10], cx
add eax, 2
test cx, cx
jne 0x4059c0
push 0x104
push 0x43f220
lea edx, [esp + 0x18]
push edx
call esi
test eax, eax
jne 0x405a04
lea esp, [esp]
movzx ecx, word [esp + eax + 0x10]
mov word [eax + 0x43f220], cx
add eax, 2
test cx, cx
jne 0x4059f0
push 0x43f220
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x405a3c
push 0x43f220
call fcn.00404100
add esp, 4
mov dword [0x43c140], 0
jmp 0x405a42
push 0x43f220
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov dword [0x43c140], ebx
xor eax, eax
jmp 0x405a50
movzx ecx, word [eax + 0x43f120]
mov word [eax + 0x43fd78], cx
add eax, 2
test cx, cx
jne 0x405a50
push 0x43f8cc
call fcn.00405350
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.00419eb3
add esp, 0x210
ret
push 0x104
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
xor ecx, ecx
lea eax, [esp + 0x10]
mov word [esp + 0x12], cx
add eax, 0xfffffffe
jmp 0x405ab0
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x405ab0
mov edx, dword [str.:Temp]
mov ecx, dword [0x430f08]
mov dword [eax], edx
mov edx, dword [0x430f0c]
mov dword [eax + 4], ecx
mov cx, word [0x430f10]
mov dword [eax + 8], edx
mov word [eax + 0xc], cx
xor eax, eax
jmp 0x405af0
movzx ecx, word [esp + eax + 0x10]
mov word [eax + 0x43f220], cx
add eax, 2
test cx, cx
jne 0x405af0
push 0x43f220
call fcn.00404100
add esp, 4
test eax, eax
jne 0x405a3c
mov eax, 0x43f84c
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405b21
sub eax, edx
sar eax, 1
jne 0x405b47
push 0x43f220
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x405a3c
push str.Cannot_create_temporary_folder__please_repackage_with_a_specific_folder._n
call fcn.0041a3ea
mov ecx, dword [esp + 0x21c]
add esp, 4
pop edi
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00419eb3
add esp, 0x210
ret