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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x44e824]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 0x204]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push 0x200
push esi
push eax
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x208], ebx
call fcn.00414350
push 0x43def8
push ebx
call fcn.0041bf81
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x40fe8b
call fcn.00418640
push str.Failed_to_open_the_KaseyaD.ini_file.
push dword [eax]
push 3
push 1
push edi
call fcn.004117f5
add esp, 0x14
push 0xfffffffffffffffb
pop esi
jmp 0x41026f
push 2
push esi
push ebx
call fcn.0041b4ed
push ebx
call fcn.00422799
push esi
push esi
push ebx
mov dword [ebp - 0x210], eax
call fcn.0041b4ed
mov eax, dword [ebp - 0x210]
inc eax
push eax
mov dword [ebp - 0x218], eax
call fcn.004188c5
add esp, 0x20
mov dword [ebp - 0x214], eax
test eax, eax
jne 0x40feda
push str.Failed_to_allocate_memory_required_to_update_the_KaeyaD.ini_file.
push 0xfffffffffffffff3
pop esi
push esi
push 3
push 3
jmp 0x41024e
push dword [ebp - 0x218]
push esi
push eax
call fcn.00414350
push ebx
push dword [ebp - 0x210]
push 1
push dword [ebp - 0x214]
call fcn.0042210b
push ebx
call fcn.0041acb0
push str.User_Name
push dword [ebp - 0x214]
call fcn.0040eceb
mov ebx, eax
add esp, 0x28
test ebx, ebx
jne 0x40ff35
push str.Invalid_format_of_the_configuration_file.
push 0xfffffffffffffff9
pop esi
push esi
push 3
push 3
push edi
call fcn.004117f5
add esp, 0x14
jmp 0x41025e
add ebx, 0xa
jmp 0x40ff3b
inc ebx
cmp byte [ebx], 0x20
je 0x40ff3a
push 0xa
push ebx
call fcn.00415f90
pop ecx
pop ecx
test eax, eax
jne 0x40ff57
push str.Invalid_format_of_the_configuration_file.
push 0xfffffffffffffff9
jmp 0x40ff23
push 0x43df98
push dword [ebp - 0x208]
inc eax
mov dword [ebp - 0x218], eax
call fcn.0041bf81
mov dword [ebp - 0x210], eax
pop ecx
pop ecx
test eax, eax
jne 0x40ff8f
push 0xfffffffffffffffb
pop esi
call fcn.00418640
push str.Failed_to_open_the_KaseyaD.ini_for_updating.
push dword [eax]
push 3
push 1
jmp 0x40ff27
mov ecx, dword [ebp - 0x214]
sub ebx, ecx
push eax
push ebx
push 1
push ecx
call fcn.0041b740
add esp, 0x10
cmp eax, ebx
je 0x40ffcc
push 0xfffffffffffffffd
pop esi
call fcn.00418640
push str.File_error_occurred_updating_the_KaseyaD.ini_file.
push dword [eax]
push 2
push 1
push edi
call fcn.004117f5
mov ebx, dword [ebp - 0x210]
jmp 0x410254
lea eax, [edi + 0x26c]
mov ecx, eax
mov dword [ebp - 0x20c], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40ffdd
sub ecx, edx
mov ebx, esi
mov dword [ebp - 0x208], ecx
je 0x410025
mov edi, dword [ebp - 0x20c]
mov esi, ecx
movsx eax, byte [edi + ebx]
push eax
call fcn.0041cea9
pop ecx
test eax, eax
je 0x41000a
inc ebx
jmp 0x410018
movsx eax, byte [edi + ebx]
push eax
call fcn.0041d03d
pop ecx
mov byte [edi + ebx], al
inc ebx
cmp ebx, esi
jb 0x40fff8
mov edi, dword [ebp - 0x21c]
xor esi, esi
lea ebx, [edi + 0x26c]
push ebx
call fcn.0040ea7d
mov dword [ebp - 0x20c], eax
pop ecx
test eax, eax
je 0x41006e
push ebx
lea eax, [ebp - 0x204]
push str.Replacing_invalid_characters_in_the_machine_ID__s
push eax
call fcn.004011e8
lea eax, [ebp - 0x204]
push eax
push dword [ebp - 0x20c]
push 1
push 3
push edi
call fcn.004117f5
push ebx
call fcn.0040ec85
add esp, 0x24
mov ebx, dword [ebp - 0x210]
lea eax, [edi + 0x26c]
push ebx
push dword [ebp - 0x208]
push 1
push eax
call fcn.0041b740
add esp, 0x10
cmp eax, dword [ebp - 0x208]
je 0x4100a3
call fcn.00418640
push str.File_error_occurred_updating_machine_ID_in_the_KaseyaD.ini_file.
jmp 0x410248
push ebx
push 1
push 1
push 0x438330
call fcn.0041b740
add esp, 0x10
cmp eax, 1
je 0x4100cc
push 0xfffffffffffffffd
pop esi
call fcn.00418640
push str.File_error_occurred_updating_the_KaseyaD.ini_file.
jmp 0x410248
lea eax, [edi + 0x2c4]
mov ecx, eax
mov dword [ebp - 0x20c], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4100dd
sub ecx, edx
mov dword [ebp - 0x208], ecx
je 0x41012b
mov edi, dword [ebp - 0x20c]
mov ebx, esi
movsx eax, byte [edi + ebx]
push eax
call fcn.0041cea9
pop ecx
test eax, eax
je 0x410108
inc ebx
jmp 0x410116
movsx eax, byte [edi + ebx]
push eax
call fcn.0041d03d
pop ecx
mov byte [edi + ebx], al
inc ebx
cmp ebx, dword [ebp - 0x208]
jb 0x4100f6
mov edi, dword [ebp - 0x21c]
mov ebx, dword [ebp - 0x210]
lea eax, [edi + 0x2c4]
push eax
call fcn.0040ea7d
mov dword [ebp - 0x20c], eax
pop ecx
test eax, eax
je 0x410180
lea eax, [edi + 0x2c4]
push eax
lea eax, [ebp - 0x204]
push str.Replacing_invalid_characters_in_the_group_ID__s
push eax
call fcn.004011e8
lea eax, [ebp - 0x204]
push eax
push dword [ebp - 0x20c]
push 1
push 3
push edi
call fcn.004117f5
lea eax, [edi + 0x2c4]
push eax
call fcn.0040ec85
add esp, 0x24
push ebx
push dword [ebp - 0x208]
lea eax, [edi + 0x2c4]
push 1
push eax
call fcn.0041b740
add esp, 0x10
cmp eax, dword [ebp - 0x208]
je 0x4101b2
push 0xfffffffffffffffd
pop esi
call fcn.00418640
push str.File_error_occurred_updating_the_group_ID_in_the_KaseyaD.ini_file.
jmp 0x410248
lea eax, [edi + 0x2c4]
push eax
lea eax, [edi + 0x26c]
push eax
lea eax, [ebp - 0x204]
push str.Agent_name:__s._s
push eax
call fcn.004011e8
lea eax, [ebp - 0x204]
push eax
push esi
push 1
push 3
push edi
call fcn.004117f5
push ebx
push 1
push 1
push 0x43b57c
call fcn.0041b740
add esp, 0x34
cmp eax, 1
je 0x410209
push 0xfffffffffffffffd
pop esi
call fcn.00418640
push str.File_error_occurred_completing_the_User_Name_entry_for_the_KaseyaD.ini_file.
jmp 0x410248
mov ecx, dword [ebp - 0x218]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410212
sub ecx, edx
push ebx
push ecx
push 1
push dword [ebp - 0x218]
mov dword [ebp - 0x20c], ecx
call fcn.0041b740
add esp, 0x10
cmp eax, dword [ebp - 0x20c]
je 0x410257
push 0xfffffffffffffffd
pop esi
call fcn.00418640
push str.File_error_occurred_completing_the_update_of_the_KaseyaD.ini_file.
push dword [eax]
push 2
push 1
push edi
call fcn.004117f5
add esp, 0x14
push ebx
call fcn.0041acb0
pop ecx
mov eax, dword [ebp - 0x214]
test eax, eax
je 0x41026f
push eax
call fcn.004188c0
pop ecx
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412e47
mov esp, ebp
pop ebp
ret