Function at 0x4c5780
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5a8580
mov eax, dword fs:[0]
push eax
sub esp, 0x44
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x58]
mov dword fs:[0], eax
mov ebp, ecx
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x20], eax
xor esi, esi
mov dword [esp + 0x60], esi
mov eax, dword [ebp + 0x10]
cmp eax, 1
jne 0x4c57e6
push str.Download
lea ebx, [esi + 8]
lea eax, [esp + 0x24]
call fcn.00404050
jmp 0x4c57fe
cmp eax, 2
lea edi, [esp + 0x20]
mov edx, str.Upload
je 0x4c57f9
mov edx, str.Synchronize
call fcn.004040f0
mov eax, dword [esp + 0x20]
push eax
push str.CUsrEngSyncModule::Start_tOption_:__s
mov ecx, ebp
call fcn.004aee70
fldz
fstp dword [ebp + 0xc]
mov dword [ebp + 0x14], 0xffffffff
mov dword [ebp + 8], 2
mov ecx, dword [ebp + 0x2c]
mov edx, dword [ecx + 4]
lea edi, [ebp + 0x28]
add esp, 8
push edx
mov ecx, edi
call fcn.004c8150
mov eax, dword [edi + 4]
mov dword [eax + 4], eax
mov eax, dword [edi + 4]
mov dword [edi + 8], esi
mov dword [eax], eax
mov eax, dword [edi + 4]
mov dword [eax + 8], eax
mov eax, dword [ebp + 0x38]
mov ecx, dword [eax + 4]
lea ebx, [ebp + 0x34]
push ecx
mov ecx, ebx
call fcn.004c8150
mov eax, dword [ebx + 4]
mov dword [eax + 4], eax
mov eax, dword [ebx + 4]
mov dword [ebx + 8], esi
mov dword [eax], eax
mov eax, dword [ebx + 4]
mov dword [eax + 8], eax
mov ecx, dword [ebp + 4]
mov edx, dword [ecx]
mov edx, dword [edx + 4]
push 1
lea eax, [esp + 0x20]
push eax
call edx
mov byte [esp + 0x60], 1
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 0xc]
cmp eax, esi
jle 0x4c58be
lea edx, [eax - 1]
cmp edx, esi
jl 0x4c5a44
cmp edx, eax
jg 0x4c5a44
movzx eax, word [ecx + edx*2]
cmp ax, 0x5c
je 0x4c58be
push 1
push 0x5bd0e8
lea eax, [esp + 0x24]
push eax
call fcn.00403fc0
push 0xb
push str.enguser.dat
lea ecx, [esp + 0x24]
push ecx
call fcn.00403fc0
mov ecx, dword [ebp + 4]
mov edx, dword [ecx]
mov edx, dword [edx + 4]
push 3
lea eax, [esp + 0x1c]
push eax
call edx
mov byte [esp + 0x60], 2
mov edx, dword [esp + 0x18]
mov eax, dword [edx - 0xc]
cmp eax, esi
jle 0x4c591e
lea ecx, [eax - 1]
cmp ecx, esi
jl 0x4c5a44
cmp ecx, eax
jg 0x4c5a44
movzx eax, word [edx + ecx*2]
cmp ax, 0x5c
je 0x4c591e
push 1
push 0x5bd0e8
lea eax, [esp + 0x20]
push eax
call fcn.00403fc0
push 0xb
push str.enguser.dat
lea ecx, [esp + 0x20]
push ecx
call fcn.00403fc0
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4c5a4e
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 0x14]
call edx
mov esi, eax
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x24], eax
push str.enguser.dat
push esi
push str.__u__s
lea edi, [esp + 0x30]
mov byte [esp + 0x6c], 3
call fcn.004126f0
mov ecx, dword [ebp + 4]
mov esi, dword [esp + 0x30]
mov eax, dword [ecx]
mov edx, dword [eax + 8]
add esp, 0xc
push esi
push ebp
call edx
lea eax, [esi - 0x10]
mov byte [esp + 0x60], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4c59bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x60], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4c59e1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x60], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4c5a06
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x60], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4c5a2e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00404550
mov eax, dword [esp + 0x1c]
push edi
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x2c], esp
mov esi, esp
call fcn.00403ce0
add eax, 0x10
mov dword [esi], eax
call fcn.004c67f0
mov eax, dword [esp + 0x18]
push ebx
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x2c], esp
mov esi, esp
call fcn.00403ce0
add eax, 0x10
mov dword [esi], eax
call fcn.004c67f0
mov eax, dword [edi + 4]
mov ecx, dword [eax]
mov dword [esp + 0x30], ecx
mov esi, edi
mov dword [esp + 0x2c], esi
lea esp, [esp]
test esi, esi
mov edx, dword [edi + 4]
mov dword [esp + 0x28], edx
je 0x4c5aaf
cmp esi, edi
je 0x4c5ab4
call fcn.00578ff3
mov eax, dword [esp + 0x28]
cmp dword [esp + 0x30], eax
je 0x4c5b06
test esi, esi
jne 0x4c5ac7
call fcn.00578ff3
mov ecx, dword [esp + 0x30]
cmp ecx, dword [esi + 4]
jne 0x4c5ad5
call fcn.00578ff3
mov eax, dword [esp + 0x30]
cmp dword [eax + 0x18], 1
jne 0x4c5af7
push eax
push esi
lea edx, [esp + 0x44]
push edx
push edi
call fcn.004c7a00
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x30], eax
jmp 0x4c5a95
lea esi, [esp + 0x2c]
call fcn.004c8610
mov esi, dword [esp + 0x2c]
jmp 0x4c5aa0
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
mov dword [esp + 0x28], ecx
mov esi, ebx
mov dword [esp + 0x24], esi
test esi, esi
mov edx, dword [ebx + 4]
mov dword [esp + 0x38], edx
je 0x4c5b24
cmp esi, ebx
je 0x4c5b29
call fcn.00578ff3
mov eax, dword [esp + 0x38]
cmp dword [esp + 0x28], eax
je 0x4c5b7b
test esi, esi
jne 0x4c5b3c
call fcn.00578ff3
mov ecx, dword [esp + 0x28]
cmp ecx, dword [esi + 4]
jne 0x4c5b4a
call fcn.00578ff3
mov eax, dword [esp + 0x28]
cmp dword [eax + 0x18], 1
jne 0x4c5b6c
push eax
push esi
lea edx, [esp + 0x44]
push edx
push ebx
call fcn.004c7a00
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x28], eax
jmp 0x4c5b11
lea esi, [esp + 0x24]
call fcn.004c8610
mov esi, dword [esp + 0x24]
jmp 0x4c5b15
mov eax, dword [edi + 4]
mov eax, dword [eax]
mov dword [esp + 0x30], eax
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov esi, edi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], eax
test esi, esi
mov ecx, dword [edi + 4]
mov dword [esp + 0x38], ecx
je 0x4c5ba6
cmp esi, edi
je 0x4c5bab
call fcn.00578ff3
mov edx, dword [esp + 0x38]
cmp dword [esp + 0x30], edx
je 0x4c594d
mov eax, dword [ebx + 4]
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4c5bcc
cmp eax, ebx
je 0x4c5bd1
call fcn.00578ff3
mov ecx, dword [esp + 0x40]
cmp dword [esp + 0x28], ecx
je 0x4c594d
test esi, esi
jne 0x4c5be8
call fcn.00578ff3
mov edx, dword [esp + 0x30]
cmp edx, dword [esi + 4]
jne 0x4c5bf6
call fcn.00578ff3
cmp dword [esp + 0x24], 0
jne 0x4c5c02
call fcn.00578ff3
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
cmp eax, dword [ecx + 4]
jne 0x4c5c14
call fcn.00578ff3
mov edx, dword [esp + 0x28]
mov eax, dword [edx + 0x38]
test eax, eax
je 0x4c5ca7
mov ecx, dword [esp + 0x30]
mov ecx, dword [ecx + 0x38]
push eax
push ecx
call fcn.00579eb9
add esp, 8
test eax, eax
jge 0x4c5c4a
lea esi, [esp + 0x2c]
call fcn.004c8610
mov esi, dword [esp + 0x2c]
jmp 0x4c5b97
jle 0x4c5c5e
lea esi, [esp + 0x24]
call fcn.004c8610
mov esi, dword [esp + 0x2c]
jmp 0x4c5b97
mov edx, dword [esp + 0x30]
push edx
push esi
lea eax, [esp + 0x4c]
push eax
push edi
call fcn.004c7a00
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov eax, dword [esp + 0x28]
push eax
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x34], edx
push ecx
lea edx, [esp + 0x54]
push edx
push ebx
call fcn.004c7a00
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], edx
jmp 0x4c5b97
push 0x80004005
call fcn.00404550
int3