Function at 0x4531ca
Capabilities:
Check if file exists
Delete file
Write file on windows

Disassembly:
mov eax, 0x522548
call fcn.0051f0b4
sub esp, 0xd4
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x20]
push edi
xor edi, edi
cmp eax, edi
jbe 0x45328b
cmp dword [esi + 0x40], edi
jbe 0x45328b
push 0x56f16c
lea ecx, [ebp - 0x14]
call fcn.00402946
push 0x5440d0
mov dword [ebp - 4], edi
call fcn.00411fcf
push eax
lea eax, [ebp - 0x14]
push str._s_s
push eax
call fcn.004142e8
add esp, 0x10
push dword [ebp - 0x14]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x453238
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x10], ebx
cmp ebx, 0xffffffff
je 0x453280
mov eax, dword [esi + 0x20]
imul eax, eax, 0x25
push edi
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x34]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, edi
jne 0x45329e
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040297c
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4
mov ebx, dword [ebp - 0x18]
push edi
push edi
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebx
je 0x4532b6
push dword [ebp - 0x10]
jmp 0x45327a
mov eax, dword [esi + 0x1c]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 4]
lea edi, [ebp - 0x30]
lea esi, [ebp - 0x28]
mov dword [ebp - 0x30], eax
call fcn.00434410
test al, al
jne 0x453411
call fcn.0043a7c8
push eax
lea ecx, [ebp - 0x20]
call fcn.004015d6
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x20]
push esi
lea ecx, [ebp - 0xe0]
call fcn.00431bce
mov byte [ebp - 4], 2
push dword [eax]
lea eax, [ebp - 0x1c]
push eax
call fcn.00431b83
lea eax, [ebp - 0xdc]
mov byte [ebp - 4], 1
cmp dword [ebp - 0xe0], eax
je 0x453331
push dword [ebp - 0xe0]
call fcn.004ea208
pop ecx
push 8
pop ecx
xor eax, eax
push 0x21
push dword [ebp - 0x1c]
mov byte [ebp - 0x5c], 0
lea edi, [ebp - 0x5b]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor edi, edi
push edi
lea eax, [ebp - 0x18]
push eax
push 0x21
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4533d4
add ebx, dword [ebp - 0x18]
push edi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push dword [ebp - 0x10]
call edi
lea esi, [ebp - 0x28]
call fcn.0043a7c8
xor esi, esi
push esi
lea ecx, [ebp - 0x18]
push ecx
push 4
add eax, 4
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, esi
je 0x4533f5
add ebx, dword [ebp - 0x18]
push esi
push esi
push ebx
push dword [ebp - 0x10]
call edi
cmp eax, ebx
jne 0x4533f5
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.0040297c
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
call fcn.0040297c
lea esi, [ebp - 0x28]
call fcn.004400ea
mov esi, dword [ebp + 8]
jmp 0x4532c4
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.0040297c
lea ecx, [esi - 0x10]
call fcn.0040297c
jmp 0x453280
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x1c]
add ecx, 0xfffffff0
call fcn.0040297c
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
jmp 0x4533eb
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x40]
shl eax, 3
mov dword [ebp - 0x38], eax
xor edi, edi
push edi
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x38]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4532b1
add ebx, dword [ebp - 0x18]
push edi
push edi
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, ebx
jne 0x4532b1
mov eax, dword [esi + 0x3c]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 0x24]
lea edi, [ebp - 0x30]
lea esi, [ebp - 0x28]
mov dword [ebp - 0x30], eax
call fcn.00434410
test al, al
jne 0x453513
call fcn.0043a7c8
mov eax, dword [eax]
mov dword [ebp - 0x20], eax
cmp eax, 0xff
ja 0x4534fd
mov esi, dword [ebp - 0x10]
xor edi, edi
push edi
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x45350d
add ebx, dword [ebp - 0x18]
push edi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push esi
call edi
cmp eax, ebx
jne 0x45350d
lea esi, [ebp - 0x28]
call fcn.0043a7c8
mov eax, dword [eax + 4]
mov dword [ebp - 0x1c], eax
xor esi, esi
push esi
lea eax, [ebp - 0x18]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4532b1
add ebx, dword [ebp - 0x18]
push esi
push esi
push ebx
push dword [ebp - 0x10]
call edi
cmp eax, ebx
jne 0x4532b1
lea esi, [ebp - 0x28]
call fcn.004400ea
mov esi, dword [ebp + 8]
jmp 0x453460
push esi
jmp 0x45327a
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x14]
add ecx, 0xfffffff0
call fcn.0040297c
xor eax, eax
inc eax
jmp 0x45328d