Function at 0x4511a5
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, 0x4583d6
call fcn.00423fa2
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.00429215
pop ecx
push eax
push esi
lea ecx, [ebp - 0x844]
call fcn.00401466
mov dword [ebp - 4], ebx
call fcn.004041a8
lea eax, [ebp - 0x844]
push eax
call fcn.004030eb
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.004018c4
push eax
push ebx
push 0x466ccc
push esi
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
mov ecx, dword [ebp - 0x8a8]
call fcn.00401b7a
mov eax, dword [ebp - 0x8a8]
cmp dword [eax + 0x14], 8
jb 0x451272
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp - 0x8a8]
cmp dword [eax + 0x14], 8
jb 0x451287
mov eax, dword [eax]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4512f4
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.00426130
mov esi, dword [ebp - 0x8a8]
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x4512c6
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.00406a87
add esp, 0x10
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x451697
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.00401a4b
mov ecx, eax
mov byte [ebp - 4], 3
cmp dword [ecx + 0x14], 8
jb 0x45133c
mov ecx, dword [ecx]
mov eax, dword [ebp - 0x8a8]
cmp dword [eax + 0x14], 8
jb 0x45134a
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0x82c]
call fcn.00403c88
push ebx
push 1
lea ecx, [ebp - 0x85c]
call fcn.0040171b
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.00403c5b
mov ecx, dword [ebp - 0x82c]
cmp dword [ecx + 0x14], 8
jb 0x4513a4
mov ecx, dword [ecx]
mov eax, dword [ebp - 0x8c4]
cmp dword [eax + 0x14], 8
jb 0x4513b2
mov eax, dword [eax]
push 1
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x451430
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.00426130
mov edi, dword [ebp - 0x82c]
add esp, 0xc
cmp dword [edi + 0x14], 8
jb 0x4513f3
mov edi, dword [edi]
mov esi, dword [ebp - 0x8c4]
cmp dword [esi + 0x14], 8
jb 0x451401
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.00406a87
add esp, 0x14
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x451679
mov eax, dword [ebp - 0x82c]
cmp dword [eax + 0x14], 8
jb 0x45143e
mov eax, dword [eax]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x451679
lea ecx, [ebp - 0x8c4]
call fcn.00401a28
mov ecx, dword [ebp - 0x8c4]
mov edx, 0x104
call fcn.004018c4
push eax
call dword [sym.imp.SHLWAPI.dll_PathQuoteSpacesW]
mov ecx, dword [ebp - 0x8c4]
call fcn.00401b7a
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.00429215
pop ecx
push eax
push esi
lea ecx, [ebp - 0x874]
call fcn.00401466
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x85c]
push dword [ebp - 0x8c4]
call fcn.00401b52
mov byte [ebp - 4], 6
lea eax, [ebp - 0x844]
mov byte [ebp - 0x8c9], bl
lea ecx, [ebp - 0x8d8]
push dword [ebp - 0x8c9]
mov dword [ebp - 0x8d8], ebx
push eax
lea eax, [ebp - 0x874]
mov dword [ebp - 0x8d4], ebx
push eax
mov dword [ebp - 0x8d0], ebx
call fcn.00407df8
push 0x4014d5
push 2
push 0x18
pop esi
push esi
lea eax, [ebp - 0x874]
mov byte [ebp - 4], 8
push eax
call fcn.00423c1a
mov eax, dword [edi + 4]
sub eax, dword [edi]
cdq
idiv esi
cmp eax, 2
jbe 0x451546
mov eax, dword [ebp - 0x8d4]
lea ecx, [ebp - 0x8d8]
mov byte [ebp - 0x8c9], bl
add eax, 0x30
push dword [ebp - 0x8c9]
push dword [edi + 4]
push dword [edi]
push eax
call fcn.00407b0e
push dword [ebp - 0x8d4]
lea ecx, [ebp - 0x88c]
push dword [ebp - 0x8d8]
call fcn.00407ab4
mov esi, dword [ebp - 0x8a8]
pop ecx
pop ecx
cmp dword [esi + 0x14], 8
jb 0x45156d
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 0x45158f
mov edi, dword [edi]
push 0x44
lea eax, [ebp - 0x920]
push 0
push eax
call fcn.00426130
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]
xor ebx, ebx
test eax, eax
je 0x4515f5
push dword [ebp - 0x850]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 0x854]
mov byte [ebp - 0x8c5], 1
jmp 0x451649
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.00426130
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.00406a87
add esp, 0xc
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [ebp - 0x8c5], bl
test ebx, ebx
je 0x451659
cmp ebx, 0xffffffff
je 0x451659
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 1
lea ecx, [ebp - 0x88c]
call fcn.0040171b
lea ecx, [ebp - 0x8d8]
call fcn.00407961
mov bl, byte [ebp - 0x8c5]
push 0
push 1
lea ecx, [ebp - 0x8c0]
call fcn.0040171b
push 0
push 1
lea ecx, [ebp - 0x828]
call fcn.0040171b
push 0
push 1
lea ecx, [ebp - 0x8a4]
call fcn.0040171b
push 0
push 1
lea ecx, [ebp - 0x844]
call fcn.0040171b
mov al, bl
call fcn.00423f4c
ret