Function at 0x403a20
Capabilities:
Delete file
Get common file path
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c2ab
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xe48
push ebx
push esi
push edi
lea eax, [ebp - 0x44]
mov dword [ebp - 0x10], esp
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x403cd3
lea ecx, [ebp - 0x148]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x411764
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x148]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x148]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x44]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp + 0x10]
push ecx
push edx
lea eax, [ebp - 0xe54]
push 0x800
push eax
mov dword [ebp - 4], 0
call dword [sym.imp.MSVCRT.dll__vsnprintf]
push 0x411b28
push ebx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x18
test esi, esi
je 0x403cbf
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push 0
push esi
call edi
mov ebx, dword [sym.imp.MSVCRT.dll_ftell]
push esi
call ebx
push 2
push 0
push esi
mov dword [ebp + 8], eax
call edi
push esi
call ebx
mov edi, eax
mov eax, dword [ebp + 8]
add esp, 0x20
lea ecx, [ebp - 0x254]
sub edi, eax
mov dword [ebp - 0x254], 0x40d2d0
call fcn.0040ba30
push 4
push str.windows
lea ecx, [ebp - 0x254]
mov byte [ebp - 4], 1
call fcn.0040ba60
xor ebx, ebx
cmp ebx, edi
jge 0x403b76
lea ecx, [ebp - 0x254]
call fcn.0040bae0
inc ebx
jmp 0x403b64
lea ecx, [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edx, dword [ebp - 0x16]
mov ecx, 0x100
xor eax, eax
lea edi, [ebp - 0x654]
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1a]
and edx, 0xffff
and eax, 0xffff
push edx
mov edx, dword [ebp - 0x1c]
and ecx, 0xffff
push eax
mov eax, dword [ebp - 0x1e]
and edx, 0xffff
push ecx
mov ecx, dword [ebp - 0x22]
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
push edx
mov edx, dword [ebp - 0x24]
and eax, 0xffff
and ecx, 0xffff
push eax
and edx, 0xffff
push ecx
push edx
lea eax, [ebp - 0x654]
push str._d__d__d__d:_d:_d__d_t
push eax
call ebx
add esp, 0x24
lea ecx, [ebp - 0xe54]
lea edi, [ebp - 0x654]
xor eax, eax
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 0x411b04
lea edx, [ebp + ecx - 0x654]
push edx
call ebx
lea edi, [ebp - 0x654]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
xor edi, edi
mov ebx, ecx
cmp edi, ebx
jge 0x403c49
lea ecx, [ebp - 0x254]
call fcn.0040bae0
mov cl, byte [ebp + edi - 0x654]
xor cl, al
mov byte [ebp + edi - 0x654], cl
inc edi
jmp 0x403c27
push esi
push 1
lea eax, [ebp - 0x654]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
lea ecx, [ebp - 0x148]
push 0
push 0x10000000
push 3
push 0
push 3
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x403cd3
lea edx, [ebp - 0x28]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [ebp - 0x28]
push esi
mov dword [ebp - 0x2c], eax
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jl 0x403cbf
jg 0x403cb2
cmp ebx, 0x100000
jbe 0x403cbf
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [ebp - 0x44]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea edx, [ebp - 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret