Function at 0x4d8740
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ec6d0
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x6670f4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [0x66b9b4]
mov esi, 0x66b170
test al, 1
jne 0x4d8794
or eax, 1
mov ecx, esi
mov dword [0x66b9b4], eax
call fcn.004d6300
push 0x5f79f0
call fcn.0050f1be
add esp, 4
call fcn.005824b0
mov ecx, eax
call fcn.00582690
mov ecx, dword [0x66b168]
mov ebx, eax
cmp ecx, dword [ebx + 0x19]
je 0x4d890a
lea eax, [ebp - 0x18]
mov ecx, edi
push eax
call fcn.004d8ab0
push dword [ebp - 0x18]
mov dword [ebp - 4], 0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
or esi, 0xffffffff
test eax, eax
je 0x4d87fc
push 0
push 0x66b170
push dword [ebp - 0x18]
mov ecx, edi
call fcn.004d9720
test eax, eax
je 0x4d88b1
mov eax, dword [ebx + 0x19]
mov edx, dword [ebp - 0x18]
mov dword [0x66b168], eax
jmp 0x4d8a56
lea eax, [ebp - 0x10]
push eax
call fcn.00579540
add esp, 4
mov eax, dword [ebp - 0x10]
mov byte [ebp - 4], 1
mov edx, dword [eax - 0xc]
test edx, edx
jle 0x4d883a
lea ecx, [edx - 1]
test ecx, ecx
js 0x4d8a98
cmp ecx, edx
jg 0x4d8a98
cmp word [eax + ecx*2], 0x5c
je 0x4d883a
push 0x5c
lea ecx, [ebp - 0x10]
call fcn.004bdbf0
push 4
push str.Skin
lea ecx, [ebp - 0x10]
call fcn.004bdc50
mov eax, dword [ebp - 0x10]
mov edx, dword [eax - 0xc]
test edx, edx
jle 0x4d887a
lea ecx, [edx - 1]
test ecx, ecx
js 0x4d8a98
cmp ecx, edx
jg 0x4d8a98
cmp word [eax + ecx*2], 0x5c
je 0x4d887a
push 0x5c
lea ecx, [ebp - 0x10]
call fcn.004bdbf0
mov eax, dword [ebp - 0x10]
push 0x66b170
push str.10000000_0000_0000_0000_000000000001
push eax
mov ecx, edi
call fcn.004d9ad0
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
test eax, eax
jne 0x4d88e6
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4d88b1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4d88d0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4d88fa
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebx + 0x19]
mov edx, dword [ebp - 0x18]
mov dword [0x66b168], eax
jmp 0x4d8a56
call fcn.004b4040
mov ecx, eax
test ecx, ecx
je 0x4d8aa2
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 2
test esi, 0xffff0000
jne 0x4d8941
movzx eax, si
lea ecx, [ebp - 0x18]
push eax
call fcn.004bd6a0
jmp 0x4d896d
mov ecx, 0x66b170
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4d8950
sub ecx, edx
sar ecx, 1
push ecx
push 0x66b170
lea ecx, [ebp - 0x18]
call fcn.004c0470
mov esi, dword [ebp - 0x18]
push str.10000000_0000_0000_0000_000000000001
push esi
call fcn.005ad849
add esp, 8
mov dword [ebp - 4], 0xffffffff
test eax, eax
lea edx, [esi - 0x10]
setne bl
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4d89a4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x4d8a72
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
call fcn.004d8ab0
push dword [ebp - 0x1c]
mov dword [ebp - 4], 4
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4d8a53
lea eax, [ebp - 0x14]
push eax
call fcn.00579540
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 5
push eax
call fcn.004dc2d0
add esp, 8
lea ecx, [ebp - 0x14]
push 4
push str.Skin
call fcn.004bdc50
lea eax, [ebp - 0x14]
push eax
call fcn.004dc2d0
add esp, 4
mov ecx, edi
push 0x66b170
push str.10000000_0000_0000_0000_000000000001
push dword [ebp - 0x14]
call fcn.004d9ad0
mov edx, dword [ebp - 0x14]
add edx, 0xfffffff0
mov byte [ebp - 4], 4
test eax, eax
mov eax, esi
jne 0x4d8a41
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4d8a39
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x1c]
jmp 0x4d88b4
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4d8a53
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4d8a72
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp + 8]
push 0x66b170
call fcn.004d65d0
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.004b3510
push 0x80004005
call fcn.004b3510
int3