Function at 0x4512f0
Capabilities:
Check if file exists
Copy file
Create directory
Create process on windows
Delete file
Get common file path
Print debug messages

Disassembly:
push 0x914
mov eax, 0x458562
call fcn.004240ea
mov edi, ecx
xor eax, eax
mov dword [ebp - 0x830], 7
mov esi, str._TMP_
mov word [ebp - 0x844], ax
xor ebx, ebx
push esi
mov dword [ebp - 0x834], ebx
call fcn.004293b5
pop ecx
push eax
push esi
lea ecx, [ebp - 0x844]
call fcn.00401419
mov dword [ebp - 4], ebx
call fcn.004042f5
lea eax, [ebp - 0x844]
push eax
call fcn.004031ba
lea eax, [ebp - 0x8a4]
mov dword [ebp - 0x890], 7
mov dword [ebp - 0x8a8], eax
xor eax, eax
mov dword [ebp - 0x894], ebx
mov word [ebp - 0x8a4], ax
mov byte [ebp - 4], 1
lea esi, [ebp - 0x844]
cmp dword [ebp - 0x830], 8
lea ecx, [ebp - 0x8a4]
mov edx, 0x104
cmovae esi, dword [ebp - 0x844]
call fcn.00401877
push eax
push ebx
push 0x466ccc
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov ecx, dword [ebp - 0x8a8]
call fcn.00401b2d
mov eax, dword [ebp - 0x8a8]
cmp dword [eax + 0x14], 8
jb 0x4513bd
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x8a8]
cmp dword [eax + 0x14], 8
jb 0x4513d2
mov eax, dword [eax]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x45143f
mov esi, str.hwang
lea edi, [ebp - 0x810]
push 0x7f2
lea eax, [ebp - 0x802]
push ebx
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call fcn.004262f0
mov esi, dword [ebp - 0x8a8]
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x451411
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
lea eax, [ebp - 0x804]
push str.CreateDirectory__s_failed__errcode:_d
push eax
call fcn.00406ba3
add esp, 0x10
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4517cf
lea eax, [ebp - 0x828]
mov dword [ebp - 0x818], ebx
push 7
mov dword [ebp - 0x82c], eax
xor eax, eax
pop esi
mov dword [ebp - 0x814], esi
mov word [ebp - 0x828], ax
lea eax, [ebp - 0x85c]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x8a8]
call fcn.004019fe
mov ecx, eax
mov byte [ebp - 4], 3
cmp dword [ecx + 0x14], 8
jb 0x451487
mov ecx, dword [ecx]
mov eax, dword [ebp - 0x8a8]
cmp dword [eax + 0x14], 8
jb 0x451495
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x82c]
call fcn.00403e3f
push ebx
push 1
lea ecx, [ebp - 0x85c]
call fcn.004016ce
lea eax, [ebp - 0x8c0]
mov dword [ebp - 0x8ac], esi
mov dword [ebp - 0x8c4], eax
xor eax, eax
mov dword [ebp - 0x8b0], ebx
mov word [ebp - 0x8c0], ax
push ebx
lea ecx, [ebp - 0x8c4]
mov byte [ebp - 4], 4
call fcn.00403e12
mov ecx, dword [ebp - 0x82c]
cmp dword [ecx + 0x14], 8
jb 0x4514ef
mov ecx, dword [ecx]
mov eax, dword [ebp - 0x8c4]
cmp dword [eax + 0x14], 8
jb 0x4514fd
mov eax, dword [eax]
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x45157b
mov esi, str.hwang
lea edi, [ebp - 0x810]
push 0x7f2
lea eax, [ebp - 0x802]
push ebx
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call fcn.004262f0
mov edi, dword [ebp - 0x82c]
add esp, 0xc
cmp dword [edi + 0x14], 8
jb 0x45153e
mov edi, dword [edi]
mov esi, dword [ebp - 0x8c4]
cmp dword [esi + 0x14], 8
jb 0x45154c
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
lea eax, [ebp - 0x804]
push str.Copy_File__s_to__s_failed__errcode:_d
push eax
call fcn.00406ba3
add esp, 0x14
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4517b1
mov eax, dword [ebp - 0x82c]
cmp dword [eax + 0x14], 8
jb 0x451589
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4517b1
lea ecx, [ebp - 0x8c4]
call fcn.004019db
mov ecx, dword [ebp - 0x8c4]
mov edx, 0x104
call fcn.00401877
push eax
call dword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
mov ecx, dword [ebp - 0x8c4]
call fcn.00401b2d
mov dword [ebp - 0x860], esi
xor eax, eax
mov esi, 0x4669d0
mov dword [ebp - 0x864], ebx
push esi
mov word [ebp - 0x874], ax
call fcn.004293b5
pop ecx
push eax
push esi
lea ecx, [ebp - 0x874]
call fcn.00401419
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x85c]
push dword [ebp - 0x8c4]
call fcn.00401b05
mov byte [ebp - 4], 6
lea eax, [ebp - 0x844]
mov byte [ebp - 0x8c8], bl
lea ecx, [ebp - 0x8d4]
push dword [ebp - 0x8c8]
mov dword [ebp - 0x8d4], ebx
push eax
lea eax, [ebp - 0x874]
mov dword [ebp - 0x8d0], ebx
push eax
mov dword [ebp - 0x8cc], ebx
call fcn.00407f36
push 0x401488
push 2
push 0x18
pop esi
push esi
lea eax, [ebp - 0x874]
mov byte [ebp - 4], 8
push eax
call fcn.00423d62
mov eax, dword [edi + 4]
sub eax, dword [edi]
cdq
idiv esi
cmp eax, 2
jbe 0x451691
mov eax, dword [ebp - 0x8d0]
lea ecx, [ebp - 0x8d4]
mov byte [ebp - 0x8c8], bl
add eax, 0x30
push dword [ebp - 0x8c8]
push dword [edi + 4]
push dword [edi]
push eax
call fcn.00407c4c
push dword [ebp - 0x8d0]
lea ecx, [ebp - 0x88c]
push dword [ebp - 0x8d4]
call fcn.00407bf2
mov esi, dword [ebp - 0x8a8]
pop ecx
pop ecx
cmp dword [esi + 0x14], 8
jb 0x4516b8
mov esi, dword [esi]
cmp dword [ebp - 0x878], 8
lea ebx, [ebp - 0x88c]
mov edi, dword [ebp - 0x82c]
cmovae ebx, dword [ebp - 0x88c]
cmp dword [edi + 0x14], 8
jb 0x4516da
mov edi, dword [edi]
push 0x44
lea eax, [ebp - 0x920]
push 0
push eax
call fcn.004262f0
add esp, 0xc
mov dword [ebp - 0x920], 0x44
lea eax, [ebp - 0x854]
xorps xmm0, xmm0
movups xmmword [ebp - 0x854], xmm0
push eax
lea eax, [ebp - 0x920]
push eax
push esi
xor eax, eax
push eax
push eax
push eax
push eax
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x451747
push dword [ebp - 0x850]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebp - 0x854]
mov bl, 1
test eax, eax
je 0x451797
cmp eax, 0xffffffff
je 0x451797
push eax
call esi
jmp 0x451797
mov esi, str.hwang
lea edi, [ebp - 0x810]
push 0x7f2
lea eax, [ebp - 0x802]
push 0
movsd dword es:[edi], dword [esi]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call fcn.004262f0
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x804]
push str.CreateProcess_failed___d_._n
push eax
call fcn.00406ba3
add esp, 0xc
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor bl, bl
push 0
push 1
lea ecx, [ebp - 0x88c]
call fcn.004016ce
lea ecx, [ebp - 0x8d4]
call fcn.00407a9f
push 0
push 1
lea ecx, [ebp - 0x8c0]
call fcn.004016ce
push 0
push 1
lea ecx, [ebp - 0x828]
call fcn.004016ce
push 0
push 1
lea ecx, [ebp - 0x8a4]
call fcn.004016ce
push 0
push 1
lea ecx, [ebp - 0x844]
call fcn.004016ce
mov al, bl
call fcn.00424094
ret