Function at 0x50c080
Capabilities:
Create directory
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x574dc8
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x416c
call fcn.0053fde0
mov eax, dword [0x5bda40]
xor eax, esp
mov dword [esp + 0x4168], eax
push ebx
push esi
push edi
mov eax, dword [0x5bda40]
xor eax, esp
push eax
lea eax, [esp + 0x4180]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor edi, edi
push edi
mov esi, ecx
mov ebx, edx
mov dword [esp + 0x4c], eax
call fcn.0053a48b
add esp, 4
push esi
lea ecx, [esp + 0x50]
mov dword [esp + 0x58], eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
call fcn.0050be00
add esp, 4
push ebx
lea ecx, [esp + 0x120]
call fcn.004020a0
lea eax, [esp + 0x11c]
lea ecx, [esp + 0x78]
mov dword [esp + 0x4188], edi
call fcn.00503cc0
push 0x5a22b0
mov ecx, eax
mov byte [esp + 0x418c], 1
call fcn.004458d0
test eax, eax
lea ecx, [esp + 0x78]
setne bl
mov byte [esp + 0x4188], 0
call fcn.004020e0
test bl, bl
je 0x50c15f
push 0x5a22b0
lea ecx, [esp + 0x120]
call fcn.00410de0
push esi
lea ecx, [esp + 0x7c]
call fcn.004020a0
lea ecx, [esp + 0x78]
lea esi, [esp + 0x138]
mov byte [esp + 0x4188], 2
call fcn.00503950
lea ecx, [esp + 0x78]
mov byte [esp + 0x4188], 4
call fcn.004020e0
lea eax, [esp + 0x11c]
lea esi, [esp + 0x100]
call fcn.005038d0
mov ecx, esi
mov byte [esp + 0x4188], 5
call fcn.00402100
push eax
call fcn.0050bc40
add esp, 4
lea ecx, [esp + 0xe4]
call fcn.00402070
mov byte [esp + 0x4188], 6
lea ecx, [esp + 0x138]
xor ebx, ebx
mov dword [esp + 0x40], edi
mov dword [esp + 0x28], 0x50d4a0
mov dword [esp + 0x2c], 0x50d4c0
mov dword [esp + 0x58], 0x50d4a0
mov dword [esp + 0x5c], 0x50d4c0
call fcn.00402050
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [esp + 0x74], eax
cmp eax, 0xffffffff
jne 0x50c260
call dword [sym.imp.KERNEL32.DLL_GetLastError]
cmp eax, edi
je 0x50c260
lea ecx, [esp + 0xe4]
call fcn.004020e0
mov ecx, esi
call fcn.004020e0
lea ecx, [esp + 0x138]
call fcn.00402030
lea ecx, [esp + 0x11c]
call fcn.004020e0
lea eax, [ebx + 1]
jmp 0x50c711
lea ecx, [esp + 0x6c]
mov dword [esp + 0x6c], 0x50d450
mov dword [esp + 0x70], 0x50d480
mov dword [esp + 0x154], 0x50fcc0
mov dword [esp + 0x158], 0x50fd20
mov dword [esp + 0x15c], 0x50fd30
mov dword [esp + 0x160], 0x50fd90
mov dword [esp + 0x164], ecx
mov dword [esp + 0x16c], edi
mov dword [esp + 0x168], edi
call fcn.0050fdb0
lea edx, [esp + 0x154]
push edx
lea eax, [esp + 0x98]
push eax
lea edx, [esp + 0x60]
lea ecx, [esp + 0x30]
mov dword [esp + 0x9c], edi
mov dword [esp + 0xa0], edi
mov dword [esp + 0xa4], edi
mov dword [esp + 0xa8], edi
mov dword [esp + 0xac], edi
mov dword [esp + 0xb0], edi
mov dword [esp + 0xb4], edi
mov dword [esp + 0xb8], edi
mov dword [esp + 0xcc], edi
mov dword [esp + 0xd0], edi
mov dword [esp + 0xd4], edi
mov dword [esp + 0xd8], edi
mov dword [esp + 0xdc], edi
mov dword [esp + 0xe0], edi
mov dword [esp + 0xe4], edi
call fcn.0050f600
mov esi, eax
add esp, 8
cmp esi, edi
je 0x50c35b
lea edi, [esp + 0x28]
lea eax, [esp + 0x94]
call fcn.0050d6b0
xor edi, edi
mov dword [esp + 0x14], esi
cmp esi, edi
jne 0x50c696
xor eax, eax
mov dword [esp + 0x68], 0xffffffff
mov dword [esp + 0x30], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x20], edi
cmp dword [esp + 0xb0], eax
jbe 0x50c685
mov ecx, dword [esp + 0xa4]
mov dword [esp + 0x18], ecx
jmp 0x50c3a0
mov dword [esp + 0x44], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xd4]
mov esi, dword [eax + edi*4 + 4]
sub esi, dword [eax + edi*4]
cmp esi, dword [esp + 0x40]
jbe 0x50c3e4
push ebx
call fcn.0053986f
add esp, 4
mov dword [esp + 0x40], esi
add esi, esi
je 0x50c671
push esi
call fcn.0053a6ab
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x50c673
mov ecx, ebx
mov eax, edi
lea edx, [esp + 0x94]
call fcn.0050edc0
mov edx, dword [esp + 0x18]
cmp byte [edx + 0x19], 0
jne 0x50c448
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x74]
push ecx
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x80]
push eax
lea ecx, [esp + 0x170]
push edi
push ecx
lea eax, [esp + 0xb8]
call fcn.0050fa20
add esp, 0x24
mov dword [esp + 0x14], eax
test eax, eax
jne 0x50c685
mov edx, dword [esp + 0x24]
add dword [esp + 0x34], edx
mov eax, 0
mov dword [esp + 0x1c], eax
adc dword [esp + 0x38], eax
cmp word [ebx], ax
je 0x50c4f1
mov edi, ebx
cmp word [edi], 0x2f
jne 0x50c4d6
lea ecx, [esp + 0x100]
xor eax, eax
push ebx
push ecx
lea esi, [esp + 0x80]
mov word [edi], ax
call fcn.0050aab0
add esp, 8
push eax
lea ecx, [esp + 0xe8]
mov byte [esp + 0x418c], 7
call fcn.00403050
mov ecx, esi
mov byte [esp + 0x4188], 6
call fcn.004020e0
lea ecx, [esp + 0xe4]
call fcn.00402100
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
test eax, eax
jne 0x50c4ce
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov edx, 0x5c
mov word [edi], dx
mov eax, dword [esp + 0x1c]
inc eax
cmp word [ebx + eax*2], 0
lea edi, [ebx + eax*2]
mov dword [esp + 0x1c], eax
jne 0x50c468
mov edi, dword [esp + 0x20]
lea eax, [esp + 0x100]
push ebx
push eax
lea esi, [esp + 0x80]
call fcn.0050aab0
add esp, 8
push eax
lea ecx, [esp + 0xe8]
mov byte [esp + 0x418c], 8
call fcn.00403050
mov ecx, esi
mov byte [esp + 0x4188], 6
call fcn.004020e0
mov ecx, dword [esp + 0x18]
cmp byte [ecx + 0x19], 0
lea ecx, [esp + 0xe4]
je 0x50c55f
call fcn.00402100
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
test eax, eax
jne 0x50c657
call dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x50c657
call fcn.00402100
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov esi, eax
mov dword [esp + 0x60], esi
cmp esi, 0xffffffff
jne 0x50c596
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x50c67d
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x1c], edx
lea edx, [esp + 0x60]
add eax, ecx
push edx
lea edi, [esp + 0x20]
call fcn.0050d340
add esp, 4
test eax, eax
jne 0x50c67d
mov eax, dword [esp + 0x24]
cmp dword [esp + 0x1c], eax
jne 0x50c67d
cmp esi, 0xffffffff
je 0x50c5ed
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
test eax, eax
jne 0x50c5ed
call dword [sym.imp.KERNEL32.DLL_GetLastError]
test eax, eax
jne 0x50c67d
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x1d], 0
je 0x50c60e
mov ecx, dword [eax + 0x14]
push ecx
lea ecx, [esp + 0xe8]
call fcn.00402100
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
cmp dword [esp + 0x48], 0
je 0x50c653
push 0
call fcn.0053a48b
sub eax, dword [esp + 0x58]
add esp, 4
test eax, eax
jg 0x50c62c
mov eax, 1
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x4c]
mov esi, dword [esp + 0x38]
push edx
push ecx
mov ecx, dword [esp + 0x3c]
push esi
push ecx
cdq
push edx
push eax
push esi
push ecx
call fcn.00549e80
push edx
push eax
call dword [esp + 0x60]
add esp, 0x18
mov edi, dword [esp + 0x20]
add dword [esp + 0x18], 0x20
inc edi
mov dword [esp + 0x20], edi
cmp edi, dword [esp + 0xb0]
jae 0x50c685
xor eax, eax
jmp 0x50c3a0
xor ebx, ebx
mov dword [esp + 0x14], 2
jmp 0x50c685
mov dword [esp + 0x14], 0xb
mov edx, dword [esp + 0x30]
push edx
lea eax, [esp + 0x2c]
push eax
call dword [esp + 0x34]
add esp, 8
lea edi, [esp + 0x28]
lea eax, [esp + 0x94]
call fcn.0050d6b0
push ebx
call fcn.0053986f
mov eax, dword [esp + 0x78]
add esp, 4
cmp eax, 0xffffffff
je 0x50c6d3
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
test eax, eax
jne 0x50c6cb
call dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x50c6d3
mov dword [esp + 0x74], 0xffffffff
mov esi, dword [esp + 0x14]
lea ecx, [esp + 0xe4]
call fcn.004020e0
lea ecx, [esp + 0x100]
call fcn.004020e0
lea ecx, [esp + 0x138]
call fcn.00402030
lea ecx, [esp + 0x11c]
call fcn.004020e0
test esi, esi
jne 0x50c70f
xor eax, eax
jmp 0x50c711
mov eax, esi
mov ecx, dword [esp + 0x4180]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4168]
xor ecx, esp
call fcn.00538a54
mov esp, ebp
pop ebp
ret