Function at 0x405d20
Capabilities:
Copy file

Disassembly:
push 0xffffffffffffffff
push 0x4edb04
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x464
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov eax, dword [esi + 0x10]
mov dword [esp + 0x14], esi
cmp eax, ebx
jne 0x40632f
mov edi, 1
lea ebp, [esi + 0x1c]
mov dword [esi + 0x10], edi
mov eax, dword [ebp + 4]
cmp eax, ebx
jne 0x405d69
mov eax, 0x4fdc00
push eax
lea ecx, [esp + 0xc0]
call fcn.0040aa80
mov eax, dword [esi + 4]
lea ecx, [esp + 0xbc]
push eax
mov dword [esp + 0x480], ebx
call fcn.0040ac10
cmp eax, 6
jne 0x40634c
mov ecx, dword [esi + 0x64]
call fcn.004121c0
test eax, eax
je 0x40612f
mov al, byte [esp + 0x13]
mov dword [esp + 0x20], ebx
mov byte [esp + 0x1c], al
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov eax, dword [0x4fdbfc]
push edi
lea ecx, [esp + 0x17]
push eax
push ecx
mov ecx, ebp
mov byte [esp + 0x488], 1
mov byte [esp + 0x1f], 0x5c
call fcn.00406540
mov esi, eax
cmp esi, 0xffffffff
jne 0x405e21
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
cmp esi, edi
mov byte [esp + 0x47c], bl
je 0x405e07
push ebx
mov ecx, esi
call fcn.00406a10
add esi, 0x24
cmp esi, edi
jne 0x405df4
mov esi, dword [esp + 0x20]
push esi
call fcn.004dae3e
add esp, 4
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
jmp 0x406318
mov dl, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x64]
mov byte [esp + 0x64], dl
call fcn.00403b70
push esi
push ebx
push ebp
lea ecx, [esp + 0x6c]
call fcn.004051a0
mov al, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x34]
mov byte [esp + 0x480], 2
mov byte [esp + 0x34], al
call fcn.00403b70
mov edi, 0x536ec0
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x47c], 3
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x536ec0
lea ecx, [esp + 0x38]
call fcn.004053a0
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x48], ebx
mov ebp, dword [ebp + 4]
mov byte [esp + 0x47c], 4
cmp ebp, ebx
jne 0x405ea3
mov ebp, 0x4fdc00
lea ecx, [esp + 0x2c]
push ecx
push ebp
call fcn.00460f60
add esp, 8
lea ecx, [esp + 0x30]
lea edi, [esi + 1]
call fcn.00405570
mov eax, dword [esp + 0x38]
cmp eax, edi
jae 0x405ec7
mov edi, eax
cmp edi, ebx
jbe 0x405eff
mov ecx, dword [esp + 0x34]
sub eax, edi
push eax
lea edx, [ecx + edi]
push edx
push ecx
call fcn.004c3020
mov esi, dword [esp + 0x44]
add esp, 0xc
sub esi, edi
lea ecx, [esp + 0x30]
push ebx
push esi
call fcn.00403be0
test al, al
je 0x405eff
mov edx, dword [esp + 0x34]
mov dword [esp + 0x38], esi
mov byte [edx + esi], bl
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x2c]
push eax
push 1
push ecx
lea ecx, [esp + 0x28]
call fcn.004065c0
push 0xbc
call fcn.004dae15
mov esi, eax
add esp, 4
mov dword [esp + 0x18], esi
cmp esi, ebx
je 0x405fa1
mov dword [esi], 0x4fdc70
mov dword [esi + 4], ebx
mov dl, byte [esp + 0x13]
lea ecx, [esi + 0xc]
push ebx
mov byte [esp + 0x480], 6
mov byte [ecx], dl
call fcn.00403b70
lea ecx, [esi + 0x20]
mov byte [esp + 0x47c], 7
call fcn.0040add0
lea ecx, [esi + 0x44]
mov byte [esp + 0x47c], 8
call fcn.004036e0
lea ecx, [esi + 0x6c]
mov byte [esp + 0x47c], 9
call fcn.004036e0
lea ecx, [esi + 0x94]
mov byte [esp + 0x47c], 0xa
call fcn.004036e0
mov dword [esi], 0x4fdc50
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0x1c], ebx
mov edi, esi
jmp 0x405fa3
xor edi, edi
push 0xd0
mov byte [esp + 0x480], 4
call fcn.004dae15
mov ebp, eax
add esp, 4
mov dword [esp + 0x18], ebp
cmp ebp, ebx
mov byte [esp + 0x47c], 0xb
je 0x406006
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x30]
cmp eax, ebx
jne 0x405fda
mov eax, 0x4fdc00
mov esi, dword [esp + 0x64]
cmp esi, ebx
jne 0x405fe7
mov esi, 0x4fdc00
mov ecx, dword [ecx + 0x64]
push 1
push ebx
push eax
call fcn.004121c0
push eax
lea eax, [esp + 0x2c]
push edi
push eax
push esi
mov ecx, ebp
call fcn.0041d2f0
mov ebp, eax
jmp 0x406008
xor ebp, ebp
push 0x74
mov byte [esp + 0x480], 4
call fcn.004dae15
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, ebx
mov byte [esp + 0x47c], 0xc
je 0x406035
mov ecx, eax
call fcn.00408360
mov esi, eax
jmp 0x406037
xor esi, esi
mov dword [esi + 0x30], edi
mov edi, dword [esp + 0x14]
mov dword [esi + 0x6c], 1
mov dword [esi + 0x70], ebx
mov dword [esi + 0x2c], ebp
mov dword [esi + 0x34], ebx
mov ecx, dword [edi + 0x64]
mov byte [esp + 0x47c], 4
call fcn.00412200
push eax
mov ecx, esi
call fcn.00407700
mov ecx, dword [edi + 0x64]
call fcn.00412200
mov ecx, eax
add ecx, 0x24
call fcn.0042d000
push eax
push 0x216
mov ecx, esi
call fcn.004073b0
mov ecx, ebp
call fcn.0041c290
mov ecx, dword [ebp + 0x28]
mov edi, eax
neg edi
sbb edi, edi
inc edi
cmp ecx, ebx
je 0x4060b3
mov edx, dword [ecx]
call dword [edx + 0x34]
test eax, eax
je 0x4060b3
mov ecx, dword [ebp + 0x50]
xor eax, eax
cmp ecx, ebx
setne al
mov dword [esp + 0x18], eax
jmp 0x4060bb
mov dword [esp + 0x18], 1
cmp esi, ebx
je 0x4060c8
mov edx, dword [esi]
push 1
mov ecx, esi
call dword [edx + 8]
push 1
lea ecx, [esp + 0x34]
mov byte [esp + 0x480], 2
call fcn.00403b70
push 1
lea ecx, [esp + 0x64]
mov byte [esp + 0x480], 1
call fcn.00403b70
mov ebp, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
cmp esi, ebp
mov byte [esp + 0x47c], bl
je 0x406114
push ebx
mov ecx, esi
call fcn.00406a10
add esi, 0x24
cmp esi, ebp
jne 0x406101
mov esi, dword [esp + 0x20]
push esi
call fcn.004dae3e
add esp, 4
cmp edi, ebx
je 0x40612b
cmp dword [esp + 0x18], ebx
je 0x406303
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 4]
push 0x24
push 0x524a54
push str.Cannot_upload_file_to_remote_system
push eax
call dword [sym.imp.user32.dll_MessageBoxA]
cmp eax, 6
jne 0x406307
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xdd]
mov byte [esp + 0xdc], bl
rep stosd dword es:[edi], eax
mov ebp, dword [esp + 0x14]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [ebp + 0x30]
cmp edi, ebx
jne 0x406178
mov edi, 0x4fdc00
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x370]
mov eax, ecx
mov esi, edi
mov edi, edx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 0x13
lea edi, [esp + 0x74]
rep stosd dword es:[edi], eax
mov dword [esp + 0x74], 0x4c
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov dword [esp + 0x78], eax
mov eax, dword [ebp + 4]
mov dword [esp + 0x74], eax
lea eax, [esp + 0x70]
lea ecx, [esp + 0x370]
lea edx, [esp + 0xdc]
push eax
mov dword [esp + 0x90], ecx
mov dword [esp + 0x94], 0x104
mov dword [esp + 0x80], 0x524bd0
mov dword [esp + 0x8c], 1
mov dword [esp + 0x98], edx
mov dword [esp + 0x9c], ebx
mov dword [esp + 0xa8], 0x80004
call sub.comdlg32.dll_GetSaveFileNameA
test eax, eax
je 0x406303
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0x20]
lea esi, [ecx + 0x1c]
cmp eax, ebx
jne 0x406237
mov eax, 0x4fdc00
mov edx, dword [esp + 0x8c]
push ebx
push edx
push eax
call dword [sym.imp.kernel32.dll_CopyFileA]
test eax, eax
jne 0x406303
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
lea eax, [esp + 0x54]
push eax
call fcn.00461090
mov ecx, 0x63
xor eax, eax
lea edi, [esp + 0x1e9]
mov byte [esp + 0x1e8], bl
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x5c]
add esp, 8
stosw word es:[edi], ax
cmp ecx, ebx
stosb byte es:[edi], al
jne 0x40628a
mov ecx, 0x4fdc00
mov eax, dword [esi + 4]
cmp eax, ebx
jne 0x406296
mov eax, 0x4fdc00
push ecx
mov ecx, dword [esp + 0x90]
push ecx
push eax
lea edx, [esp + 0x1ec]
push str.Cannot_copy__s_to__s._Error:__s
push edx
call fcn.004c335e
mov ecx, dword [esp + 0x28]
add esp, 0x14
lea eax, [esp + 0x1e0]
mov edx, dword [ecx + 4]
push 0x30
push 0x524a54
push eax
push edx
call dword [sym.imp.user32.dll_MessageBoxA]
mov eax, dword [esp + 0x54]
cmp eax, ebx
je 0x4062f7
lea ecx, [eax - 1]
mov al, byte [eax - 1]
cmp al, bl
je 0x4062ee
cmp al, 0xff
je 0x4062ee
dec al
mov byte [ecx], al
jmp 0x4062f7
push ecx
call fcn.004dae3e
add esp, 4
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov esi, dword [esp + 0x14]
mov eax, dword [esi + 0x14]
mov dword [esi + 0x10], ebx
cmp eax, ebx
je 0x406318
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
lea ecx, [esp + 0xbc]
mov dword [esp + 0x47c], 0xffffffff
call fcn.0040abb0
mov ecx, dword [esp + 0x474]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x470
ret 8
mov dword [esi + 0x18], edi
jmp 0x406307