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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56bf3a
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x5cefd4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov byte [ebp - 0xd], cl
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
or ebx, 0xffffffff
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], 1
jl 0x4046c4
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, ebx
je 0x40433c
test al, 0x10
jne 0x4046c4
push 1
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp + 8]
call fcn.00402e00
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
cmp ecx, 1
jne 0x404362
test ecx, ecx
js 0x4046fc
cmp word [eax], 0x5c
je 0x40436c
cmp byte [ebp - 0xd], 0
mov byte [ebp - 0xd], 1
jne 0x404370
mov byte [ebp - 0xd], 0
mov edx, dword [ebp - 0x20]
xor esi, esi
add edx, 0xfffffff0
mov dword [ebp - 0x1c], esi
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40438f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0xd], 0
mov dword [ebp - 0x18], esi
je 0x4044b5
mov byte [ebp - 4], 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x4043b5
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x4043cb
call fcn.0040879e
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x404706
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x18], 2
mov dword [ebp - 0x14], 0x5c
lea esi, [eax + 0x10]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], eax
mov ebx, dword [eax - 0xc]
lea edi, [ebx + 1]
test edi, edi
js 0x404710
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x404415
push edi
lea ecx, [ebp - 0x1c]
call fcn.00404060
mov esi, dword [ebp - 0x1c]
push ebx
push dword [ebp - 0x20]
push ebx
push esi
call fcn.00403f00
push 1
lea eax, [ebp - 0x14]
push eax
lea eax, [esi + ebx*2]
push 1
push eax
call fcn.00403f00
add esp, 0x20
cmp edi, dword [esi - 8]
jg 0x4046fc
mov dword [esi - 0xc], edi
xor eax, eax
mov word [esi + edi*2], ax
lea edi, [esi - 0x10]
mov ebx, dword [ebp + 8]
add ebx, 0xfffffff0
cmp edi, ebx
je 0x404494
cmp dword [ebx + 0xc], eax
jl 0x404488
mov eax, dword [edi]
cmp eax, dword [ebx]
jne 0x404488
push edi
call fcn.00403e90
add esp, 4
lea edx, [ebx + 0xc]
mov esi, eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x404480
mov ecx, dword [ebx]
push ebx
mov edx, dword [ecx]
call dword [edx + 4]
lea eax, [esi + 0x10]
mov dword [ebp + 8], eax
jmp 0x404494
push dword [esi - 0xc]
lea ecx, [ebp + 8]
push esi
call fcn.00403c90
xor esi, esi
mov byte [ebp - 4], 0
mov dword [ebp - 0x1c], esi
or eax, 0xffffffff
mov dword [ebp - 0x18], esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4044b5
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.0040879e
mov ecx, eax
test ecx, ecx
je 0x40471a
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push 0x5ad84c
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 2
call fcn.00403830
test al, al
jne 0x4044f3
push 0
push 0x5ad84c
lea ecx, [ebp - 0x14]
call fcn.00403c90
mov byte [ebp - 4], 3
xor ebx, ebx
mov eax, dword [ebp + 8]
mov edi, dword [ebp - 0x14]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jle 0x40469a
nop word [eax + eax]
mov dword [ebp - 0x2c], esi
test ebx, ebx
js 0x4046fc
cmp ebx, ecx
jg 0x4046fc
movzx eax, word [eax + ebx*2]
mov dword [ebp - 0x24], eax
lea eax, [edi - 0x10]
mov byte [ebp - 4], 4
mov ecx, dword [eax]
mov dword [ebp - 0x28], eax
test ecx, ecx
je 0x404543
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
jne 0x404557
call fcn.0040879e
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
test eax, eax
je 0x404706
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
lea esi, [eax + 0x10]
mov eax, dword [ebp - 0x1c]
or eax, 4
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x24]
movzx eax, ax
mov dword [ebp - 0x24], eax
mov eax, dword [edi - 0xc]
mov dword [ebp - 0x1c], eax
lea edx, [eax + 1]
test edx, edx
js 0x4046fc
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edx
or eax, ecx
jge 0x4045a4
push edx
lea ecx, [ebp - 0x20]
call fcn.00404060
mov esi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
push eax
push edi
push eax
push esi
call fcn.00403f00
push 1
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
push 1
lea eax, [esi + eax*2]
push eax
call fcn.00403f00
mov eax, dword [ebp - 0x1c]
add esp, 0x20
inc eax
cmp eax, dword [esi - 8]
jg 0x4046fc
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea edx, [esi - 0x10]
lea eax, [edi - 0x10]
mov dword [ebp - 0x1c], edx
cmp edx, eax
je 0x404634
mov edi, dword [ebp - 0x28]
cmp dword [edi + 0xc], ecx
jl 0x404622
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x404622
push edx
call fcn.00403e90
add esp, 4
lea edx, [edi + 0xc]
mov esi, eax
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40461a
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
lea edi, [esi + 0x10]
mov dword [ebp - 0x14], edi
jmp 0x404631
push dword [esi - 0xc]
lea ecx, [ebp - 0x14]
push esi
call fcn.00403c90
mov edi, dword [ebp - 0x14]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x2c]
or eax, 0xffffffff
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 3
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404656
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + 8]
cmp ebx, dword [eax - 0xc]
jg 0x4046fc
cmp word [eax + ebx*2], 0x5c
jne 0x40468e
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404679
test al, 0x10
jne 0x40468b
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40468b
cmp ebx, 3
jg 0x4046be
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 0xc]
inc ebx
cmp ebx, ecx
jl 0x404510
mov byte [ebp - 0xd], 1
or ebx, 0xffffffff
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, ebx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x4046c8
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4046c8
mov byte [ebp - 0xd], 0
jmp 0x40469e
mov byte [ebp - 0xd], 1
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4046e7
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00404240
push 0x80004005
call fcn.00404240
push 0x80070057
call fcn.00404240
push 0x80004005
call fcn.00404240
int3