Function at 0x477840
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4afb38
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x4f3168]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 0xc]
test edx, edx
jne 0x477870
xor ecx, ecx
jmp 0x477884
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x477875
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, 0x4f80a8
call fcn.004040d0
mov eax, dword [0x4f80a8]
mov edx, dword [eax - 0xc]
test edx, edx
jle 0x4778c2
lea ecx, [edx - 1]
test ecx, ecx
js 0x4779a0
cmp ecx, edx
jg 0x4779a0
cmp word [eax + ecx*2], 0x5c
je 0x4778c2
push 0x5c
mov ecx, 0x4f80a8
call fcn.004020b0
push str.cdict_
lea eax, [ebp + 0xc]
push 0x4f80a8
push eax
call fcn.00401ea0
add esp, 0xc
push eax
mov ecx, 0x4f80c4
mov dword [ebp - 4], 0
call fcn.00401cd0
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
or edi, 0xffffffff
mov dword [ebp - 4], 0xffffffff
lea ecx, [edx + 0xc]
mov eax, edi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x477910
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push dword [0x4f80c4]
push 0
call dword [0x4b42bc]
mov eax, dword [0x4f80a8]
mov esi, dword [eax - 0xc]
test esi, esi
jle 0x47794a
lea edx, [esi - 1]
test edx, edx
js 0x4779a0
cmp edx, esi
jg 0x4779a0
cmp word [eax + edx*2], 0x5c
je 0x47794a
push 0x5c
mov ecx, 0x4f80a8
call fcn.004020b0
push str.cdictlist.ini
lea eax, [ebp + 0xc]
push 0x4f80a8
push eax
call fcn.00401ea0
add esp, 0xc
push eax
mov ecx, 0x4f80c0
mov dword [ebp - 4], 1
call fcn.00401cd0
mov edx, dword [ebp + 0xc]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x477995
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
test edx, edx
jne 0x4779aa
xor ecx, ecx
jmp 0x4779bf
push 0x80070057
call fcn.00402400
mov ecx, edx
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4779b0
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, 0x4f80c8
call fcn.004040d0
mov eax, dword [0x4f80c8]
mov esi, dword [eax - 0xc]
test esi, esi
jle 0x4779f5
lea edx, [esi - 1]
test edx, edx
js 0x4779a0
cmp edx, esi
jg 0x4779a0
cmp word [eax + edx*2], 0x5c
je 0x4779f5
push 0x5c
mov ecx, 0x4f80c8
call fcn.004020b0
push str.cdict_
lea eax, [ebp - 0x10]
push 0x4f80c8
push eax
call fcn.00401ea0
add esp, 0xc
push eax
mov ecx, 0x4f80ac
mov dword [ebp - 4], 2
call fcn.00401cd0
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x477a3e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 0x10], 0
push dword [0x4f80c0]
je 0x477a86
mov edi, dword [0x4b42d0]
mov esi, 1
call edi
test eax, eax
jne 0x477a62
xor esi, esi
call fcn.00476810
push dword [0x4f80c0]
call edi
test eax, eax
jne 0x477a73
call fcn.00475bf0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call dword [0x4b42d0]
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret