Function at 0x509820
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x5db184
mov eax, dword fs:[0]
push eax
sub esp, 0xec
mov eax, dword [0x66d4f4]
xor eax, esp
mov dword [esp + 0xe8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x66d4f4]
xor eax, esp
push eax
lea eax, [esp + 0x100]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x110]
xor ebx, ebx
cmp ebp, ebx
mov ecx, ebp
jne 0x50986f
mov ecx, 0x63a990
mov edi, 0xf
mov eax, ecx
mov dword [esp + 0xf8], edi
mov dword [esp + 0xf4], ebx
mov byte [esp + 0xe4], bl
lea esi, [eax + 1]
mov edi, edi
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x509890
sub eax, esi
push eax
push ecx
lea ecx, [esp + 0xe8]
call fcn.00408ea0
push 1
push 0x60114c
lea ecx, [esp + 0x30]
mov dword [esp + 0x110], ebx
mov dword [esp + 0x48], edi
mov dword [esp + 0x44], ebx
mov byte [esp + 0x34], 0
call fcn.00408ea0
push 1
push 0x601148
lea ecx, [esp + 0x4c]
mov byte [esp + 0x110], 1
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], 0
call fcn.00408ea0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0xe8]
push edx
mov byte [esp + 0x114], 2
call fcn.00510470
mov esi, 0x10
add esp, 0xc
cmp dword [esp + 0x5c], esi
jb 0x50992c
mov eax, dword [esp + 0x48]
push eax
call fcn.005a1b1d
add esp, 4
cmp dword [esp + 0x40], esi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x58], ebx
mov byte [esp + 0x48], 0
mov byte [esp + 0x108], 0
jb 0x509954
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.005a1b1d
add esp, 4
push 0x60114c
lea edx, [esp + 0xe4]
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.00512560
add esp, 0xc
push 1
push 2
lea ecx, [esp + 0x68]
mov byte [esp + 0x110], 3
call fcn.0040a750
cmp byte [ebp], 0x5c
mov byte [esp + 0x108], 4
jne 0x5099a3
lea ecx, [esp + 0x60]
push 0x60114c
push ecx
call fcn.00409270
add esp, 8
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
xor ebp, ebp
test esi, esi
mov dword [esp + 0x24], ebx
je 0x509b14
mov ecx, edi
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
jae 0x509b14
cmp dword [ebx + esi + 0x14], 0
je 0x509ab1
test esi, esi
je 0x509a00
sub edi, esi
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebp, eax
jb 0x509a09
call fcn.005bdf65
mov esi, dword [esp + 0x18]
lea eax, [ebx + esi]
push 0x60114c
push eax
lea edx, [esp + 0x68]
push edx
call fcn.00408950
add esp, 8
push eax
call fcn.00409270
add esp, 8
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x64]
call fcn.00408c00
cmp dword [eax + 0x14], 3
mov esi, 0x10
setbe bl
cmp dword [esp + 0x40], esi
jb 0x509a55
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.005a1b1d
add esp, 4
test bl, bl
jne 0x509aa5
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x64]
call fcn.00408c00
cmp dword [eax + 0x18], esi
jb 0x509a71
mov eax, dword [eax + 4]
jmp 0x509a74
add eax, 4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
sete bl
cmp dword [esp + 0x40], esi
jb 0x509a95
mov eax, dword [esp + 0x2c]
push eax
call fcn.005a1b1d
add esp, 4
test bl, bl
je 0x509aa5
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0xb7
jne 0x509abc
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x24]
add ebp, 1
add ebx, 0x1c
jmp 0x5099ad
lea ecx, [esp + 0xac]
mov byte [esp + 0x108], 3
call fcn.00409510
lea ecx, [esp + 0xac]
push ecx
mov dword [esp + 0xb0], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
lea ecx, [esp + 0x14]
call fcn.0042a8e0
cmp dword [esp + 0xf8], esi
jb 0x509b0d
mov edx, dword [esp + 0xe4]
push edx
call fcn.005a1b1d
add esp, 4
xor eax, eax
jmp 0x509b9a
lea ecx, [esp + 0xac]
mov byte [esp + 0x108], 3
call fcn.00409510
lea eax, [esp + 0xac]
push eax
mov dword [esp + 0xb0], vtable.std::ios_base.0
call fcn.005d9cc4
mov eax, dword [esp + 0x1c]
xor esi, esi
add esp, 4
cmp eax, esi
je 0x509b6f
mov ecx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x18]
push edx
push ecx
push eax
call fcn.0042b040
mov edx, dword [esp + 0x28]
push edx
call fcn.005a1b1d
add esp, 0x14
cmp dword [esp + 0xf8], 0x10
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], esi
jb 0x509b95
mov eax, dword [esp + 0xe4]
push eax
call fcn.005a1b1d
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x100]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xe8]
xor ecx, esp
call fcn.005bd2d7
add esp, 0xf8
ret