Function at 0x418180
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cf130
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x52de08]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea eax, [ebp - 0x14]
push eax
lea ecx, [edi + 0x204]
call fcn.004122b0
mov dword [ebp - 4], 0
mov ecx, dword [eax]
cmp dword [ecx - 0xc], 0
sete bl
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4181ef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x418480
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [edi + 0x204]
call fcn.004122b0
mov dword [ebp - 4], 2
lea edx, [ebp - 0x1c]
push edx
call fcn.00435c40
add esp, 4
lea eax, [ebp - 0x1c]
push eax
lea ecx, [edi + 0x204]
call fcn.00414190
lea edx, [ebp - 0x14]
lea ecx, [edi + 0x688]
push edx
mov dword [ebp - 0x24], ecx
call fcn.004122b0
mov byte [ebp - 4], 3
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x18]
call fcn.00409830
mov byte [ebp - 4], 6
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41826c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
push eax
call fcn.00406ee0
add eax, 0x10
add esp, 4
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x10]
call fcn.00412610
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [edi + 0x204]
call fcn.004122b0
mov byte [ebp - 4], 0xb
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x10]
call fcn.00412570
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4182ce
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00414260
mov byte [ebp - 4], 0xd
mov edx, dword [eax]
cmp dword [edx - 0xc], 0
sete bl
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41830a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x4183fb
mov edx, dword [0x52ddd4]
mov eax, dword [edx + 0xc]
mov ecx, 0x52ddd4
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov bl, 0x10
mov byte [ebp - 4], bl
mov edi, dword [edi + 0x508]
cmp edi, 1
jne 0x418382
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
lea ecx, [ebp - 0x20]
push ecx
call fcn.00415220
add esp, 4
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x14]
call fcn.00412bf0
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4183cf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4183cf
cmp edi, 2
jne 0x418399
lea ecx, [ebp - 0x20]
push ecx
call fcn.004155d0
add esp, 4
mov byte [ebp - 4], 0x13
jmp 0x4183ae
cmp edi, 5
jne 0x4183cf
lea edx, [ebp - 0x20]
push edx
call fcn.00414f00
add esp, 4
mov byte [ebp - 4], 0x15
push eax
lea ecx, [ebp - 0x14]
call fcn.00412bf0
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x20]
call fcn.00406650
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov esi, dword [ebp - 0x14]
push esi
lea ecx, [ebp - 0x10]
call fcn.004124d0
mov byte [ebp - 4], 0xa
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4183fb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x18]
push 0
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [ebp - 0x24]
lea edx, [ebp - 0x10]
push edx
call fcn.00414190
mov byte [ebp - 4], 6
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418437
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41845a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x418480
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call 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