Function at 0x421f50
Capabilities:
Copy file

Disassembly:
sub esp, 0x30c
push ebx
push esi
push edi
mov edi, dword [esp + 0x31c]
push 0x46d354
push edi
call fcn.00459902
mov esi, eax
add esp, 8
test esi, esi
jne 0x421f9e
lea eax, [esp + 0x10]
push str.KaseyaD.ini_configuration_file_is_missing_n
push eax
mov ebx, 1
call fcn.00458ee7
lea ecx, [esp + 0x14]
push ecx
mov dword [esp + 0x18], ebx
call fcn.0043e010
add esp, 0xc
jmp 0x42211b
push 2
push 0
push esi
call fcn.0045985d
push esi
call fcn.0045978d
push 0
push 0
push esi
mov ebx, eax
call fcn.0045985d
add esp, 0x1c
cmp ebx, 0x44c
jge 0x421ff7
push esi
call fcn.00459521
push ebx
lea edx, [esp + 0x18]
push str.Possibly_corrupted_KaseyaD.ini_file_found_containing_only__d_bytes_n
push edx
xor esi, esi
call fcn.00458ee7
lea eax, [esp + 0x1c]
push eax
mov dword [esp + 0x20], 1
call fcn.0043e010
add esp, 0x14
jmp 0x422111
lea ecx, [ebx + 1]
push 1
push ecx
call fcn.00459dd1
mov edi, eax
add esp, 8
test edi, edi
je 0x422101
push esi
push ebx
push 1
push edi
call fcn.00459489
push str._SERVER_COMMUNICATIONS_
push edi
call fcn.0044db90
add esp, 0x18
test eax, eax
je 0x4220d5
push str.User_Name
push edi
call fcn.0044db90
add esp, 8
test eax, eax
je 0x4220d5
push str.AgentPassword
push edi
call fcn.0044db90
add esp, 8
test eax, eax
je 0x4220d5
push str.Password
push edi
call fcn.0044db90
add esp, 8
test eax, eax
je 0x4220d5
push str.Server_Name
push edi
call fcn.0044db90
add esp, 8
test eax, eax
je 0x4220d5
push str.Server_Port
push edi
call fcn.0044db90
add esp, 8
test eax, eax
je 0x4220d5
push str.Revisit_Period
push edi
call fcn.0044db90
add esp, 8
test eax, eax
je 0x4220d5
push str.Fast_Check_Period
push edi
call fcn.0044db90
add esp, 8
test eax, eax
je 0x4220d5
push str.Backup_Server_Name
push edi
call fcn.0044db90
add esp, 8
test eax, eax
je 0x4220d5
push str.Backup_Server_Port
push edi
call fcn.0044db90
add esp, 8
test eax, eax
jne 0x422101
push esi
call fcn.00459521
lea edx, [esp + 0x14]
push str.Possibly_corrupted_KaseyaD.ini_file_found_with_missing_key_components_n
push edx
xor esi, esi
call fcn.00458ee7
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 1
call fcn.0043e010
add esp, 0x10
push edi
call fcn.0045932f
mov edi, dword [esp + 0x320]
add esp, 4
xor ebx, ebx
test esi, esi
jne 0x422219
lea edx, [esp + 0x210]
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x422126
lea eax, [esp + 0x210]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x422140
sub eax, edx
mov cl, byte [esp + eax + 0x20c]
cmp cl, 0x2e
lea eax, [esp + eax + 0x210]
jne 0x422222
lea edi, [esp + 0x210]
mov byte [eax - 3], 0
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x422170
mov ecx, dword [0x4748cc]
lea edx, [esp + 0x210]
push 0x46d354
push edx
mov dword [edi], ecx
call fcn.00459902
mov esi, eax
add esp, 8
test esi, esi
je 0x422222
push 2
push 0
push esi
call fcn.0045985d
push esi
call fcn.0045978d
push 0
push 0
push esi
mov edi, eax
call fcn.0045985d
add esp, 0x1c
cmp edi, 0x3e8
jge 0x4221ca
test ebx, ebx
je 0x422219
push esi
call fcn.00459521
mov eax, dword [esp + 0x320]
add esp, 4
push 0
push eax
lea ecx, [esp + 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea edx, [esp + 0x10]
push str.Restoring_configuration_file_using_KaseyaD.bak_n
push edx
call fcn.00458ee7
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 1
call fcn.0043e010
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 0x30c
ret
push esi
call fcn.00459521
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x30c
ret