Function at 0x406800
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x55d214
mov eax, dword fs:[0]
push eax
sub esp, 0x9d8
mov eax, dword [0x5b7a9c]
xor eax, esp
mov dword [esp + 0x9d4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5b7a9c]
xor eax, esp
push eax
lea eax, [esp + 0x9ec]
mov dword fs:[0], eax
call fcn.004036e0
push 0x208
lea eax, [esp + 0x1cc]
push eax
push 7
mov dword [esp + 0x30], 1
call fcn.00412940
xor ebx, ebx
lea ecx, [esp + 0x1d4]
push ebx
push ecx
call fcn.00450b40
mov dword [esp + 0x28], eax
movzx ecx, word [eax]
xor edx, edx
add esp, 0x14
cmp dx, cx
je 0x406897
mov edx, 0xfeff
cmp dx, cx
jne 0x406933
xor ecx, ecx
cmp cx, word [eax + 2]
jne 0x406933
push 0xffffffffffffffff
push ebx
push eax
call fcn.004510d0
push 0x208
lea edx, [esp + 0x1d8]
push edx
push 6
call fcn.00412940
lea eax, [esp + 0x1e0]
push ebx
push eax
call fcn.00450b40
mov dword [esp + 0x34], eax
movzx ecx, word [eax]
add esp, 0x20
cmp cx, bx
je 0x406933
mov edx, 0xfeff
cmp dx, cx
jne 0x4068e3
xor ecx, ecx
cmp cx, word [eax + 2]
je 0x406933
push 0xffffffffffffffff
push ebx
push eax
mov dword [esp + 0x30], ebx
call fcn.004510d0
push 0x208
lea edx, [esp + 0x5e8]
push edx
push 7
call fcn.00412940
add esp, 0x18
push ebx
lea eax, [esp + 0x5dc]
push eax
lea ecx, [esp + 0x1d0]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
lea edx, [esp + 0x5d8]
push ebx
push edx
call fcn.00450b40
add esp, 8
mov dword [esp + 0x14], eax
call fcn.0050830c
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40694d
push 0x80004005
call fcn.00401350
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x9f4], ebx
mov dword [esp + 0x28], ebx
push 5
push str.Count
lea ecx, [esp + 0x20]
call fcn.00401e70
mov eax, dword [esp + 0x18]
test ebx, ebx
jle 0x4069cc
mov edi, dword [eax - 0xc]
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
lea esi, [edi + 1]
sub ecx, esi
or ecx, edx
jge 0x4069a5
push esi
lea ecx, [esp + 0x1c]
call fcn.00401c00
mov eax, dword [esp + 0x18]
mov cl, bl
add cl, 0x30
movsx dx, cl
mov word [eax + edi*2], dx
test esi, esi
jl 0x406ca9
cmp esi, dword [eax - 8]
jg 0x406ca9
xor ecx, ecx
mov dword [eax - 0xc], esi
mov word [eax + esi*2], cx
mov edx, dword [esp + 0x14]
push 0
push eax
push 0x56fad8
lea ebp, [ebx*4 + 0x5b8f80]
push edx
mov dword [esp + 0x40], ebp
call fcn.0044f120
mov dword [ebp], eax
lea eax, [ebx + 1]
push eax
mov dword [esp + 0x40], eax
lea eax, [esp + 0x2c]
push str.FTP
push eax
call fcn.00406020
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
push eax
push eax
push 0x56fad8
lea ecx, [esp + 0x44]
push ecx
push edx
call fcn.0044f010
mov edx, dword [esp + 0x4c]
add esp, 0x30
test edx, edx
jne 0x406a2c
xor eax, eax
jmp 0x406a40
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406a31
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebx*4 + 0x5b8fd0]
call fcn.00401e70
mov eax, dword [esp + 0x1c]
push eax
call fcn.004ff267
mov esi, dword [ebp]
xor ecx, ecx
mov eax, esi
mov edx, 0x1ef8
mul edx
seto cl
neg ecx
or ecx, eax
xor eax, eax
add ecx, 4
setb al
neg eax
or eax, ecx
push eax
call fcn.004ff272
add esp, 8
mov dword [esp + 0x34], eax
mov byte [esp + 0x9f4], 1
test eax, eax
je 0x406ab1
push 0x441cb0
push 0x43cc70
push esi
lea edi, [eax + 4]
push 0x1ef8
push edi
mov dword [eax], esi
call fcn.00540dee
mov eax, edi
jmp 0x406ab3
xor eax, eax
lea edi, [ebx*4 + 0x5b8fa8]
xor ebx, ebx
cmp dword [ebp], ebx
mov byte [esp + 0x9f4], 0
mov dword [edi], eax
jle 0x406b1b
mov ebp, dword [esp + 0x28]
xor esi, esi
mov ecx, dword [edi]
mov dword [esi + ecx + 8], ebp
mov edx, dword [edi]
lea ecx, [esi + edx + 0x7c]
call fcn.004028f0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov edx, dword [edi]
push eax
push ebp
push ecx
lea eax, [esi + edx + 0x7c]
push eax
call fcn.00403760
mov ecx, dword [edi]
mov edx, dword [esi + ecx + 0xb0]
lea eax, [esi + ecx]
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x40]
inc ebx
add esp, 0x10
inc ebp
add esi, 0x1ef8
cmp ebx, dword [eax]
jl 0x406ad1
mov ebx, dword [esp + 0x2c]
add dword [esp + 0x28], 0x3e8
cmp ebx, 0xa
jl 0x406968
mov ecx, dword [esp + 0x14]
push 0
push str.Index
push 0x56fad8
push ecx
call fcn.0044f120
mov edx, dword [esp + 0x24]
push 0xffffffffffffffff
push 0
push edx
mov dword [0x5b10ac], eax
call fcn.004510d0
add esp, 0x1c
cmp dword [esp + 0x24], 0
jne 0x406d2c
push 0x208
lea eax, [esp + 0x1cc]
push eax
push 7
call fcn.00412940
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x1d8]
push edx
call fcn.00450b40
add esp, 0x14
xor ebp, ebp
mov dword [esp + 0x14], eax
xor edi, edi
jmp 0x406ba0
xor esi, esi
cmp dword [edi + 0x5b8f80], esi
jle 0x406be0
xor ebx, ebx
lea esp, [esp]
lea eax, [esi + ebp]
push eax
mov eax, dword [edi + 0x5b8fa8]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x1c]
push edx
lea ecx, [ebx + eax + 0x7c]
push ecx
call fcn.00403a00
inc esi
add esp, 0x10
add ebx, 0x1ef8
cmp esi, dword [edi + 0x5b8f80]
jl 0x406bb0
mov edx, dword [str._s_d]
add esi, ebp
push esi
push 0x56fad8
push edx
lea eax, [esp + 0x44]
push eax
call fcn.00403570
push 1
push 0
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x34]
push eax
call fcn.0044dad0
add esp, 0x24
test eax, eax
je 0x406c4f
mov ecx, dword [str._s_d]
inc esi
push esi
push 0x56fad8
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00403570
push 1
push 0
lea eax, [esp + 0x50]
push eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.0044dad0
add esp, 0x24
test eax, eax
jne 0x406c18
add edi, 4
add ebp, 0x3e8
cmp edi, 0x28
jl 0x406ba0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x1cc]
push ecx
push edx
call fcn.004510d0
push 0x208
lea eax, [esp + 0x1d8]
push eax
push 6
call fcn.00412940
add esp, 0x18
call fcn.0050830c
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x406cb3
push 0x80004005
call fcn.00401350
push 0x80070057
call fcn.00401350
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
lea ecx, [esp + 0x1c8]
push ecx
lea edx, [esp + 0x20]
push 0x54bc
push edx
mov byte [esp + 0xa00], 2
call fcn.00402170
mov esi, dword [esp + 0x28]
add esp, 0xc
push 0
push 0x24
push esi
call fcn.0050bda7
cmp eax, 6
jne 0x406d08
lea eax, [esp + 0x1c8]
push eax
call fcn.0044dfe0
add esp, 4
lea eax, [esi - 0x10]
mov byte [esp + 0x9f4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d2c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x9f4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406d57
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x9ec]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x9d4]
xor ecx, esp
call fcn.0053fa67
add esp, 0x9e4
ret