Function at 0x4c5710
Capabilities:
Check if file exists
Create directory
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x4e39df
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x66c
push ebx
push ebp
mov ebp, ecx
push esi
push edi
xor ebx, ebx
lea eax, [ebp + 0x62750]
or esi, 0xffffffff
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x14], 1
mov edi, dword [ebp + 0x624]
xor ecx, ecx
test edi, edi
mov dword [esp + 0x684], ebx
jle 0x4c57e5
mov eax, dword [ebp + 0x60c]
mov edx, dword [esp + 0x690]
cmp dword [eax + 8], edx
jne 0x4c578b
test ebx, ebx
jne 0x4c5781
mov ebx, 1
mov esi, dword [eax + 0xc]
mov dword [esp + 0x18], eax
inc esi
jmp 0x4c578f
test ebx, ebx
jne 0x4c5799
inc ecx
add eax, 0xc80
cmp ecx, edi
jl 0x4c576c
cmp esi, 0xffffffff
jle 0x4c57e5
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push eax
call esi
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x68c]
mov dword [esp + 0x14], 0
push 2
mov edx, dword [ecx]
mov ecx, ebp
push edx
push eax
call fcn.004c4c10
mov edi, eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4c5c56
mov ecx, dword [esp + 0x10]
push ecx
call esi
jmp 0x4c5c56
mov edx, dword [ebp + 0x60c]
xor ebx, ebx
or eax, 0xffffffff
cmp edx, ebx
je 0x4c5843
mov esi, dword [esp + 0x68c]
cmp esi, ebx
jle 0x4c5814
cmp esi, 0xc350
jge 0x4c5814
mov ecx, dword [ebp + esi*4 + 0xc50]
cmp ecx, ebx
je 0x4c5846
jmp 0x4c5827
cmp esi, 0x4190ab00
jl 0x4c5846
mov ecx, dword [ebp + esi*4 - 0x63f9270]
cmp ecx, ebx
je 0x4c5846
mov eax, dword [ecx]
cmp eax, 0xffffffff
je 0x4c5846
cmp eax, edi
jge 0x4c5843
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
shl ecx, 7
add ecx, edx
je 0x4c5843
cmp dword [ecx], esi
je 0x4c5846
or eax, 0xffffffff
lea ecx, [eax + eax*4]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
lea ecx, [ecx + ecx*4]
shl ecx, 7
lea esi, [ecx + edx]
mov dl, byte [esp + 0x37]
mov dword [esp + 0x18], esi
mov byte [esp + 0x1c], dl
mov edx, dword [esi + 8]
cmp eax, edi
mov byte [esp + 0x684], 1
mov dword [esp + 0x2c], edx
mov ebx, eax
jge 0x4c5923
xor eax, eax
cmp esi, eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], eax
je 0x4c5923
mov edi, ecx
mov eax, dword [esp + 0x2c]
mov ecx, dword [esi + 8]
cmp ecx, eax
jne 0x4c5923
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0x54]
dec eax
push ecx
mov dword [esi + 0xc], eax
mov dword [esi + 0x18], 4
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov eax, dword [esp + 0x54]
lea edx, [esi + 0x1c]
mov dword [esi + 0x1c], eax
mov ecx, dword [esp + 0x58]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x5c]
mov dword [edx + 8], eax
mov ecx, dword [esp + 0x60]
mov dword [edx + 0xc], ecx
mov edx, dword [esi]
mov dword [esp + 0x38], edx
mov edx, dword [esp + 0x24]
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0x38]
push ecx
push edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], esi
call fcn.004d1040
mov eax, dword [ebp + 0x624]
inc ebx
add edi, 0xc80
cmp ebx, eax
jge 0x4c5923
mov eax, dword [ebp + 0x60c]
mov esi, edi
add esi, eax
jne 0x4c589b
mov eax, dword [ebp + 0x14]
mov esi, 2
cmp eax, esi
jne 0x4c5ade
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4c594e
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [esp + 0x14], 0
cmp dword [ebp + 0x14], esi
jne 0x4c5a8b
push 0x410
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
je 0x4c5a8b
lea eax, [ebp + 0x62750]
lea ecx, [esp + 0x2c]
push eax
call fcn.004c5cf0
mov ebx, dword [esp + 0x18]
mov ecx, 0x104
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, 0x103
lea edi, [esp + 0x26e]
mov word [esp + 0x26c], ax
lea edx, [esp + 0x26c]
rep stosd dword es:[edi], eax
mov ecx, dword [ebx]
mov byte [esp + 0x684], 2
push ecx
push 0x208
push edx
mov ecx, ebp
stosw word es:[edi], ax
call fcn.004ca1d0
mov edi, dword [sym.imp.MSVCRT.dll_wcslen]
lea eax, [esp + 0x26c]
push eax
call edi
lea ecx, [esp + 0x270]
push eax
push ecx
push esi
call dword [sym.imp.MSVCRT.dll_wcsncat]
lea edx, [esp + 0x27c]
push edx
call edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x7a]
mov word [esp + 0x78], 0
rep stosd dword es:[edi], eax
add esp, 0x14
lea ecx, [esp + 0x64]
stosw word es:[edi], ax
mov eax, dword [esp + 0x690]
push eax
push 0x104
push ecx
mov ecx, ebp
call fcn.004ca1d0
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
je 0x4c5a4b
lea eax, [esp + 0x64]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x4c5a4b
mov eax, dword [esp + 0x30]
test eax, eax
je 0x4c5a8b
jmp 0x4c5a80
lea ecx, [esp + 0x2c]
call fcn.004c56f0
mov edx, dword [ebx]
push 2
push edx
mov ecx, ebp
call fcn.004cb5c0
push 4
lea eax, [esp + 0x68]
push esi
push eax
mov ecx, ebp
call fcn.004ca060
push esi
call fcn.004ace19
mov eax, dword [esp + 0x34]
add esp, 4
test eax, eax
je 0x4c5a8b
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x68c], 0
call fcn.00495620
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004ace19
mov ecx, dword [esp + 0x18]
xor eax, eax
add esp, 4
cmp ecx, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
je 0x4c5ad4
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
jmp 0x4c5c58
push 0xc80
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x2c], eax
xor esi, esi
mov byte [esp + 0x684], 3
cmp eax, esi
je 0x4c5b08
mov ecx, eax
call fcn.004c5c80
mov ebx, eax
jmp 0x4c5b0a
xor ebx, ebx
cmp ebx, esi
mov byte [esp + 0x684], 1
jne 0x4c5b65
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
push eax
push ecx
lea ecx, [esp + 0x24]
mov byte [esp + 0x68c], 0
call fcn.00495620
mov edx, dword [esp + 0x20]
push edx
call fcn.004ace19
mov eax, dword [esp + 0x18]
add esp, 4
cmp eax, esi
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
je 0x4c5b5d
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
or eax, 0xffffffff
jmp 0x4c5c58
mov ecx, 0x320
xor eax, eax
mov edi, ebx
mov dword [ebp + 0x600], 1
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x18]
mov ecx, 0x320
mov esi, eax
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x690]
mov esi, dword [ebx + 8]
mov dword [ebx + 8], ecx
mov dword [eax + 8], ecx
lea ecx, [esp + 0x44]
mov edi, 1
push ecx
mov dword [eax + 0xc], edi
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x44]
add edx, 0x1c
push 0x4c09c0
push 0xc80
mov dword [edx], eax
mov ecx, dword [esp + 0x50]
mov dword [edx + 4], ecx
mov eax, dword [esp + 0x54]
mov dword [edx + 8], eax
mov ecx, dword [esp + 0x58]
mov dword [edx + 0xc], ecx
mov edx, dword [ebp + 0x624]
mov eax, dword [ebp + 0x60c]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_qsort]
add esp, 0x10
mov ecx, ebp
call fcn.004c7f50
lea ecx, [esp + 0x10]
call fcn.004c56f0
mov ecx, dword [ebx + 8]
mov edx, dword [ebx]
push ecx
push esi
push edx
mov ecx, ebp
call fcn.004c5d10
cmp dword [ebp + 0x14], edi
jne 0x4c5c1a
mov ecx, ebp
call fcn.004c1d20
lea eax, [esp + 0x1c]
push esi
push eax
push edi
push ebx
mov ecx, ebp
call fcn.004c3550
push ebx
call fcn.004ace19
add esp, 4
lea ecx, [esp + 0x1c]
mov byte [esp + 0x684], 0
call fcn.00461e80
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4c5c56
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
mov ecx, dword [esp + 0x67c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x678
ret 8