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

Disassembly:
push 0xffffffffffffffff
push 0x50f22e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x178
push ebx
push ebp
mov dword [esp + 0x28], ecx
push esi
push edi
mov ecx, 0x54bd30
call fcn.004f5b00
test eax, eax
je 0x4af69e
mov ebp, dword [esp + 0x198]
push 0x100
push 0x28
mov ecx, ebp
call fcn.004ab190
push 0x101
push 0x28
mov ecx, ebp
mov dword [esp + 0x1c], eax
call fcn.004ab190
push 4
push 0x28
mov ecx, ebp
mov dword [esp + 0x18], eax
call fcn.004ab080
test eax, eax
je 0x4af69e
mov esi, dword [eax + 8]
test esi, esi
je 0x4af69e
mov eax, dword [eax + 4]
lea edi, [esp + 0x44]
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov byte [esp + eax + 0x44], 0
mov ecx, 3
mov edi, 0x54612c
lea esi, [esp + 0x44]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4af6bb
mov ecx, 3
mov edi, 0x548004
lea esi, [esp + 0x44]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x4af6bb
mov ecx, 3
mov edi, 0x546130
lea esi, [esp + 0x44]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x4af6d6
xor eax, eax
mov ecx, dword [esp + 0x188]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x184
ret 8
mov eax, 0x18
mov ecx, 0x54bd50
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
call fcn.004c69c0
test eax, eax
je 0x4af69e
push 6
push 0x28
mov ecx, ebp
call fcn.004ab190
test ax, ax
jne 0x4af69e
mov eax, 8
cmp word [esp + 0x14], ax
jbe 0x4af701
cmp word [esp + 0x10], ax
jne 0x4af701
mov dword [esp + 0x10], 0xa
push 0x10
push 0x7fe0
mov ecx, ebp
call fcn.004ab080
test eax, eax
je 0x4af69e
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x4af69e
mov ebx, dword [eax + 0x14]
test ebx, ebx
je 0x4af69e
mov ecx, dword [ebx + 0x14]
cmp ecx, 1
jbe 0x4af69e
push 0x10
push 0x28
mov ecx, ebp
mov dword [esp + 0x3c], eax
call fcn.004ab080
test eax, eax
je 0x4af69e
mov eax, dword [eax + 8]
test eax, eax
je 0x4af69e
xor esi, esi
push 0x11
mov si, word [eax]
push 0x28
mov ecx, ebp
mov dword [esp + 0x34], esi
call fcn.004ab080
test eax, eax
je 0x4af69e
mov eax, dword [eax + 8]
test eax, eax
je 0x4af69e
mov ebp, dword [esp + 0x14]
xor edi, edi
mov di, word [eax]
cmp bp, 0x18
mov dword [esp + 0x28], edi
jne 0x4af7dd
lea ecx, [esp + 0x84]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
je 0x4af7c5
lea edx, [esp + 0x84]
lea eax, [esp + 0x84]
push edx
push 0
push 0x541a18
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x4af7dd
push 1
lea ecx, [esp + 0x88]
push str.C:HeCZ_d
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov eax, dword [ebx + 0x14]
lea ecx, [eax - 1]
mov eax, ebp
and eax, 0xffff
imul eax, edi
imul eax, esi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esp + 0x24], eax
imul eax, ecx
push eax
mov dword [esp + 0x3c], eax
call sub.MFC42.DLL_operatornew
mov dword [esp + 0x24], eax
mov eax, dword [ebx + 0x14]
mov ebp, 1
add esp, 4
cmp eax, ebp
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], ebp
jbe 0x4af9c1
cmp ebp, eax
jb 0x4af835
xor ecx, ecx
jmp 0x4af87e
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x4af851
mov ecx, dword [ebx + 0x10]
inc ecx
cmp ecx, ebp
jne 0x4af851
mov edx, dword [edx + 8]
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0xc], edx
mov ecx, edx
jmp 0x4af87e
mov ecx, eax
shr ecx, 1
cmp ebp, ecx
jae 0x4af86a
mov ecx, dword [ebx + 4]
test ebp, ebp
jbe 0x4af878
mov eax, ebp
mov ecx, dword [ecx + 8]
dec eax
jne 0x4af862
jmp 0x4af878
mov ecx, dword [ebx + 8]
sub eax, ebp
dec eax
je 0x4af878
mov ecx, dword [ecx + 4]
dec eax
jne 0x4af872
mov dword [ebx + 0xc], ecx
mov dword [ebx + 0x10], ebp
mov ecx, dword [ecx]
push 0xe000
push 0xfffe
call fcn.004ab080
mov esi, eax
test esi, esi
je 0x4af9c1
mov eax, dword [esi + 8]
test eax, eax
je 0x4af9c1
mov ecx, dword [esp + 0x19c]
test ecx, ecx
je 0x4af8bd
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x30]
push edx
push eax
call fcn.004b01a0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
lea edi, [eax + ecx]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
push edx
mov edx, dword [esp + 0x14]
push edi
push eax
mov eax, dword [esp + 0x38]
and edx, 0xffff
push ecx
mov ecx, dword [esp + 0x38]
push edx
push eax
push ecx
mov ecx, 0x54bd30
call fcn.004c6540
test eax, eax
je 0x4af99d
cmp word [esp + 0x14], 0x18
jne 0x4af9c1
lea edx, [esp + 0x84]
push 0x545eb4
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4af9bd
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
push ebp
push eax
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
lea edx, [esp + 0x40]
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x84]
push edx
push eax
push ecx
mov ecx, 0x54bd50
call fcn.004c6a30
lea edx, [esp + 0x84]
mov ebp, eax
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test ebp, ebp
je 0x4af9bd
mov eax, dword [esp + 0x28]
mov esi, ebp
imul eax, dword [esp + 0x2c]
push ebp
lea ecx, [eax + eax*2]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call sub.MFC42.DLL_operatordelete
mov ebp, dword [esp + 0x20]
add esp, 4
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x18]
mov eax, dword [ebx + 0x14]
add esi, ecx
inc ebp
mov dword [esp + 0x18], esi
cmp ebp, eax
mov dword [esp + 0x1c], ebp
jb 0x4af835
jmp 0x4af9c1
mov ebp, dword [esp + 0x1c]
cmp ebp, dword [ebx + 0x14]
jae 0x4af9d8
mov edx, dword [esp + 0x20]
push edx
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x4af69e
push 0x20
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x30], eax
test eax, eax
mov dword [esp + 0x190], 0
je 0x4afa13
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
push 1
push ecx
push edx
push 0x10
push 0x7fe0
mov ecx, eax
call fcn.004aa010
mov esi, eax
jmp 0x4afa15
xor esi, esi
mov ecx, dword [esp + 0x34]
push esi
mov dword [esp + 0x194], 0xffffffff
call fcn.004ab3c0
test esi, esi
je 0x4afa3e
mov ecx, esi
call fcn.004aa050
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 1
jmp 0x4af6a0