Function at 0x4036b0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5374d1
mov eax, dword fs:[0]
push eax
sub esp, 0x82c
mov eax, dword [0x596120]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x820]
push 0x100
push eax
push 0x100
lea eax, [ebp - 0x620]
mov dword [ebp - 0x834], edi
push eax
push 0x100
lea eax, [ebp - 0x420]
push eax
push 3
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.0051f7ee
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x220], ax
lea eax, [ebp - 0x21e]
push eax
call fcn.00521b90
push 0
push 0
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x220]
push 0x104
push eax
call fcn.00520da3
add esp, 0x48
lea eax, [ebp - 0x220]
lea ecx, [ebp - 0x830]
push eax
call fcn.00405270
push dword [ebp - 0x830]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea ecx, [esi + 1]
cmp eax, 0xffffffff
jne 0x403781
xor al, al
jmp 0x40378b
test al, 0x10
cmovne esi, ecx
test esi, esi
setne al
mov edx, dword [ebp - 0x830]
or ebx, 0xffffffff
add edx, 0xfffffff0
movzx esi, al
mov eax, ebx
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4037b0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x4037bb
mov al, 1
jmp 0x403a01
push edi
lea ecx, [ebp - 0x828]
call fcn.00405270
mov dword [ebp - 4], 0
mov edi, 3
mov eax, dword [ebp - 0x828]
cmp dword [eax - 0xc], edi
jle 0x40394c
call fcn.0040ae72
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x403993
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x830], esi
push edi
lea eax, [ebp - 0x838]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x828]
call fcn.00403f00
mov byte [ebp - 4], 2
lea ebx, [esi - 0x10]
mov ecx, dword [eax]
lea edx, [ecx - 0x10]
cmp edx, ebx
je 0x403885
cmp dword [ebx + 0xc], 0
lea esi, [ebx + 0xc]
jl 0x403870
mov eax, dword [edx]
cmp eax, dword [ebx]
jne 0x403870
push edx
call fcn.00404b90
add esp, 4
mov dword [ebp - 0x82c], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x403865
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x82c]
lea esi, [eax + 0x10]
mov dword [ebp - 0x830], esi
jmp 0x403885
push dword [ecx - 0xc]
push ecx
lea ecx, [ebp - 0x830]
call fcn.00405170
mov esi, dword [ebp - 0x830]
mov byte [ebp - 4], 1
or ebx, 0xffffffff
mov edx, dword [ebp - 0x838]
mov ecx, ebx
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4038ab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esi - 0xc], 0
je 0x403974
push esi
mov dword [ebp - 0x82c], 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4038e4
test al, 0x10
mov ecx, 1
mov eax, dword [ebp - 0x82c]
cmovne eax, ecx
test eax, eax
setne al
test al, al
jne 0x4038f5
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x403974
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x403912
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
inc edi
mov eax, dword [ebp - 0x828]
js 0x403940
cmp edi, dword [eax - 0xc]
jge 0x403940
lea eax, [eax + edi*2]
push 0x5c
push eax
call fcn.00520a66
mov edi, eax
add esp, 8
mov eax, dword [ebp - 0x828]
test edi, edi
je 0x403940
sub edi, eax
sar edi, 1
jmp 0x403943
or edi, 0xffffffff
cmp edi, dword [eax - 0xc]
jl 0x4037e2
push dword [ebp - 0x834]
lea ecx, [ebp - 0x82c]
call fcn.00405270
push dword [ebp - 0x82c]
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40399d
xor al, al
jmp 0x4039ac
add esi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, ebx
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40394c
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40394c
push 0x80004005
call fcn.00405120
test al, 0x10
mov eax, 1
cmovne esi, eax
test esi, esi
setne al
mov edx, dword [ebp - 0x82c]
mov ecx, ebx
add edx, 0xfffffff0
movzx esi, al
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4039ce
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
mov dword [ebp - 4], 0xffffffff
mov esi, dword [ebp - 0x828]
setne byte [ebp - 0x821]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x4039fb
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0x821]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0051ef35
mov esp, ebp
pop ebp
ret 4