Function at 0x431ce0
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x93c
mov eax, dword [0x61094c]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x104
lea eax, [ebp - 0x108]
mov dword [ebp - 0x934], edx
push 0
push eax
mov dword [ebp - 0x930], ecx
call fcn.00556260
add esp, 0xc
lea eax, [ebp - 0x108]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x431d39
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00553daa
mov esp, ebp
pop ebp
ret
mov ecx, 0x104
lea eax, [ebp - 0x108]
cmp byte [eax], 0
je 0x431d4f
inc eax
sub ecx, 1
jne 0x431d44
push ebx
push esi
mov edx, 0x104
mov esi, ecx
mov eax, edx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x431d9f
lea ecx, [ebp - 0x108]
lea ecx, [ecx + esi]
sub edx, esi
je 0x431d94
mov esi, str.WinInit.Ini
mov eax, SysReAllocString
sub esi, ecx
nop
test eax, eax
je 0x431d94
mov bl, byte [esi + ecx]
test bl, bl
je 0x431d94
mov byte [ecx], bl
dec eax
inc ecx
sub edx, 1
jne 0x431d80
test edx, edx
lea eax, [ecx - 1]
cmovne eax, ecx
mov byte [eax], 0
push 0
push 0x8000080
push 4
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x431dcc
xor ebx, ebx
jmp 0x431ed8
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x431e55
lea ecx, [ebx + 1]
push ecx
call fcn.00560371
mov edi, eax
add esp, 4
test edi, edi
je 0x431f8f
push 0
lea eax, [ebp - 0x92c]
mov dword [ebp - 0x92c], 0
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x431f8f
mov eax, dword [ebp - 0x92c]
push str._Rename_
push edi
mov byte [eax + edi], 0
call fcn.00556e40
add esp, 8
test eax, eax
jne 0x431ef1
push str._rename_
push edi
call fcn.00556e40
add esp, 8
test eax, eax
jne 0x431ef1
push edi
call fcn.0055e8cd
add esp, 4
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x410
lea eax, [ebp - 0x928]
push 0
push eax
call fcn.00556260
push dword [ebp - 0x930]
lea eax, [ebp - 0x928]
push dword [ebp - 0x934]
push str._r_n_rename__r_n_s_s_r_n
push 0x410
push eax
call fcn.00435000
lea ecx, [ebp - 0x928]
mov dword [ebp - 0x93c], 0
add esp, 0x20
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x431eb0
push 0
lea eax, [ebp - 0x93c]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x928]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
pop edi
test esi, esi
je 0x431edf
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop esi
xor ecx, ebp
pop ebx
call fcn.00553daa
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x410
lea eax, [ebp - 0x518]
push 0
push eax
call fcn.00556260
push dword [ebp - 0x930]
cmp byte [edi + ebx - 1], 0xa
mov ecx, str._s_s_r_n
push dword [ebp - 0x934]
mov eax, str._r_n_s_s_r_n
cmove eax, ecx
push eax
lea eax, [ebp - 0x518]
push 0x410
push eax
call fcn.00435000
lea ecx, [ebp - 0x518]
mov dword [ebp - 0x938], 0
add esp, 0x20
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x431f57
push 0
lea eax, [ebp - 0x938]
sub ecx, edx
push eax
push ecx
lea eax, [ebp - 0x518]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x431f8f
push edi
mov ebx, 1
call fcn.0055e8cd
add esp, 4
jmp 0x431ed3
push edi
xor ebx, ebx
call fcn.0055e8cd
add esp, 4
jmp 0x431ed3