Function at 0x40d960
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x214
mov eax, dword [0x42cb90]
xor eax, esp
mov dword [esp + 0x210], eax
push ebx
push ebp
mov ebp, dword [esp + 0x220]
push esi
mov esi, dword [esp + 0x228]
push 0x1ff
lea eax, [esp + 0x21]
push 0
push eax
mov dword [esp + 0x1c], esi
mov dword [esp + 0x18], 0
mov byte [esp + 0x28], 0
call fcn.0040eb90
push 0x427b3c
push esi
call fcn.0040f6c8
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x40d9f0
call fcn.0041069a
mov ecx, dword [eax]
push str.Failed_to_open_the_KaseyaD.ini_file.
push ecx
push 3
push 1
push ebp
call fcn.0040e6f0
add esp, 0x14
pop esi
pop ebp
lea eax, [ebx - 5]
pop ebx
mov ecx, dword [esp + 0x210]
xor ecx, esp
call fcn.0040f6db
add esp, 0x214
ret
push edi
push 2
push 0
push ebx
call fcn.0040f57f
push ebx
call fcn.0040f48a
push 0
push 0
push ebx
mov esi, eax
call fcn.0040f57f
lea edi, [esi + 1]
push edi
call fcn.0040f141
add esp, 0x20
test eax, eax
mov dword [esp + 0x18], eax
jne 0x40da42
push str.Failed_to_allocate_memory_required_to_update_the_KaeyaD.ini_file.
push 0xfffffffffffffff3
push 3
push 3
push ebp
call fcn.0040e6f0
add esp, 0x14
mov dword [esp + 0x10], 0xfffffff3
jmp 0x40ddbf
push edi
push 0
push eax
call fcn.0040eb90
mov edi, dword [esp + 0x24]
push ebx
push esi
push 1
push edi
call fcn.0040f0d7
push ebx
call fcn.0040f276
push str.User_Name
push edi
call fcn.0040b310
mov esi, eax
add esp, 0x28
test esi, esi
jne 0x40da94
push str.Invalid_format_of_the_configuration_file.
push 0xfffffffffffffff9
push 3
push 3
push ebp
call fcn.0040e6f0
add esp, 0x14
mov dword [esp + 0x10], 0xfffffff9
jmp 0x40ddd0
add esi, 0xa
cmp byte [esi], 0x20
jne 0x40daa8
lea esp, [esp]
add esi, 1
cmp byte [esi], 0x20
je 0x40daa0
push 0xa
push esi
call fcn.0040f700
add esp, 8
test eax, eax
jne 0x40dad0
push str.Invalid_format_of_the_configuration_file.
push 0xfffffffffffffff9
push 3
push 3
push ebp
call fcn.0040e6f0
add esp, 0x14
jmp 0x40ddd0
mov edx, dword [esp + 0x14]
add eax, 1
push 0x427aa0
push edx
mov dword [esp + 0x24], eax
call fcn.0040f6c8
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x40db16
mov dword [esp + 0x10], 0xfffffffb
call fcn.0041069a
mov eax, dword [eax]
push str.Failed_to_open_the_KaseyaD.ini_for_updating.
push eax
push 3
push 1
push ebp
call fcn.0040e6f0
add esp, 0x14
jmp 0x40ddbf
push ebx
sub esi, edi
push esi
push 1
push edi
call fcn.0040edb9
add esp, 0x10
cmp eax, esi
je 0x40db50
mov dword [esp + 0x10], 0xfffffffd
call fcn.0041069a
push str.File_error_occurred_updating_the_KaseyaD.ini_file.
mov ecx, dword [eax]
push ecx
push 2
push 1
push ebp
call fcn.0040e6f0
add esp, 0x14
jmp 0x40ddbf
lea eax, [ebp + 0x26c]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40db60
sub eax, edx
mov edi, eax
mov dword [esp + 0x14], edi
mov esi, 0
je 0x40dbb9
jmp 0x40db80
movsx edx, byte [esi + ebp + 0x26c]
push edx
call fcn.0041268f
add esp, 4
test eax, eax
je 0x40db9a
add esi, 1
jmp 0x40dbb2
movsx eax, byte [esi + ebp + 0x26c]
push eax
call fcn.00412632
add esp, 4
mov byte [esi + ebp + 0x26c], al
add esi, 1
cmp esi, edi
jb 0x40db80
lea edi, [ebp + 0x26c]
push edi
call fcn.0040b4b0
mov esi, eax
add esp, 4
test esi, esi
je 0x40dbf7
push edi
lea ecx, [esp + 0x24]
push str.Replacing_invalid_characters_in_the_machine_ID
push ecx
call fcn.0041025a
lea edx, [esp + 0x2c]
push edx
push esi
push 1
push 3
push ebp
call fcn.0040e6f0
push edi
call fcn.0040b530
add esp, 0x24
mov esi, dword [esp + 0x14]
push ebx
push esi
push 1
push edi
call fcn.0040edb9
add esp, 0x10
cmp eax, esi
je 0x40dc2b
call fcn.0041069a
push str.File_error_occurred_updating_machine_ID_in_the_KaseyaD.ini_file.
mov eax, dword [eax]
push eax
push 2
push 1
push ebp
call fcn.0040e6f0
add esp, 0x14
jmp 0x40ddbf
push ebx
push 1
push 1
push 0x4279c4
call fcn.0040edb9
add esp, 0x10
cmp eax, 1
je 0x40dc69
mov dword [esp + 0x10], 0xfffffffd
call fcn.0041069a
mov ecx, dword [eax]
push str.File_error_occurred_updating_the_KaseyaD.ini_file.
push ecx
push 2
push 1
push ebp
call fcn.0040e6f0
add esp, 0x14
jmp 0x40ddbf
lea esi, [ebp + 0x2c4]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40dc74
sub eax, edx
mov dword [esp + 0x14], eax
mov edi, 0
je 0x40dcbf
lea ebx, [ebx]
movsx edx, byte [esi + edi]
push edx
call fcn.0041268f
add esp, 4
test eax, eax
je 0x40dca6
add edi, 1
jmp 0x40dcb6
movsx eax, byte [esi + edi]
push eax
call fcn.00412632
add esp, 4
mov byte [esi + edi], al
add edi, 1
cmp edi, dword [esp + 0x14]
jb 0x40dc90
push esi
call fcn.0040b4b0
mov edi, eax
add esp, 4
test edi, edi
je 0x40dcf7
push esi
lea ecx, [esp + 0x24]
push str.Replacing_invalid_characters_in_the_group_ID
push ecx
call fcn.0041025a
lea edx, [esp + 0x2c]
push edx
push edi
push 1
push 3
push ebp
call fcn.0040e6f0
push esi
call fcn.0040b530
add esp, 0x24
mov edi, dword [esp + 0x14]
push ebx
push edi
push 1
push esi
call fcn.0040edb9
add esp, 0x10
cmp eax, edi
je 0x40dd23
mov dword [esp + 0x10], 0xfffffffd
call fcn.0041069a
push str.File_error_occurred_updating_the_group_ID_in_the_KaseyaD.ini_file.
jmp 0x40dc16
push esi
lea eax, [ebp + 0x26c]
push eax
lea ecx, [esp + 0x28]
push str.Agent_name:__s._s
push ecx
call fcn.0041025a
lea edx, [esp + 0x30]
push edx
push 0
push 1
push 3
push ebp
call fcn.0040e6f0
push ebx
push 1
push 1
push 0x4247c8
call fcn.0040edb9
add esp, 0x34
cmp eax, 1
je 0x40dd79
mov dword [esp + 0x10], 0xfffffffd
call fcn.0041069a
push str.File_error_occurred_completing_the_User_Name_entry_for_the_KaseyaD.ini_file.
jmp 0x40dc16
mov edx, dword [esp + 0x1c]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40dd82
sub eax, esi
push ebx
mov esi, eax
push esi
push 1
push edx
call fcn.0040edb9
add esp, 0x10
cmp eax, esi
je 0x40ddb7
mov dword [esp + 0x10], 0xfffffffd
call fcn.0041069a
push str.File_error_occurred_completing_the_update_of_the_KaseyaD.ini_file.
jmp 0x40db3b
mov dword [esp + 0x10], 0
test ebx, ebx
je 0x40ddcc
push ebx
call fcn.0040f276
add esp, 4
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40dddd
push edi
call fcn.0040e862
add esp, 4
mov ecx, dword [esp + 0x220]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040f6db
add esp, 0x214
ret