Function at 0x408210
Capabilities:
Check if file exists
Copy file
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x41c628
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov eax, dword [0x423044]
xor eax, esp
push eax
lea eax, [esp + 0x2c]
mov dword fs:[0], eax
mov eax, dword [0x424614]
mov edx, dword [eax + 0xc]
mov ecx, 0x424614
mov dword [esp + 0x1c], 1
call edx
lea ebp, [eax + 0x10]
mov dword [esp + 0x14], ebp
mov dword [esp + 0x34], 0
mov eax, dword [0x424614]
mov edx, dword [eax + 0xc]
mov ecx, 0x424614
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x3c]
add edi, 0x50
mov byte [esp + 0x34], 1
mov esi, dword [edi + 4]
cmp esi, dword [edi + 8]
jbe 0x40828c
call fcn.0040ccd6
mov ebx, esi
mov edi, edi
mov esi, dword [edi + 8]
cmp dword [edi + 4], esi
jbe 0x40829d
call fcn.0040ccd6
cmp edi, edi
je 0x4082a6
call fcn.0040ccd6
cmp ebx, esi
je 0x4084ad
cmp ebx, dword [edi + 8]
jb 0x4082b8
call fcn.0040ccd6
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0x20]
push ebx
add ecx, 0x1c
push eax
call fcn.00408720
add esp, 8
mov byte [esp + 0x34], 2
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [ebp - 0x10]
cmp eax, esi
je 0x408324
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x408313
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x408313
call fcn.00409630
mov ebp, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40830a
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x14], ebp
jmp 0x408320
mov edi, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x18]
call fcn.004094d0
mov ebp, dword [esp + 0x14]
mov byte [esp + 0x34], 1
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 0x408349
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [esp + 0x3c]
cmp ebx, dword [esi + 0x58]
lea edi, [esi + 0x50]
jb 0x40835a
call fcn.0040ccd6
lea ecx, [ebx + 0x158]
push ecx
lea edx, [esp + 0x2c]
lea ecx, [esi + 0x10]
push edx
call fcn.00408720
add esp, 8
mov esi, eax
mov byte [esp + 0x34], 3
cmp ebx, dword [edi + 8]
jb 0x408382
call fcn.0040ccd6
lea eax, [esp + 0x24]
push ebx
push eax
mov ecx, esi
call fcn.00408720
add esp, 8
mov byte [esp + 0x34], 4
mov ecx, dword [eax]
mov esi, dword [esp + 0x18]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x4083ed
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x4083e0
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4083e0
call fcn.00409630
mov ebp, eax
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x4083d3
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x18], ebp
mov ebp, dword [esp + 0x14]
jmp 0x4083ed
mov edi, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x1c]
call fcn.004094d0
mov byte [esp + 0x34], 3
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408412
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x34], 1
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408437
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebp
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x408477
mov edi, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileA]
push 0
push edi
push ebp
call esi
test eax, eax
mov dword [esp + 0x1c], eax
jne 0x408470
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push edi
push ebp
call esi
test eax, eax
mov dword [esp + 0x1c], eax
je 0x408493
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov edi, dword [esp + 0x3c]
add edi, 0x50
cmp ebx, dword [edi + 8]
jb 0x408488
call fcn.0040ccd6
add ebx, 0x25c
jmp 0x408290
mov ecx, dword [0x425498]
mov edx, dword [ecx]
mov eax, dword [edx + 0x18]
push htons
mov dword [esp + 0x20], 0
call eax
mov byte [esp + 0x34], 0
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 0x4084d2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x10]
mov dword [esp + 0x34], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4084f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4