Function at 0x422550
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x324
mov ecx, dword [ebp + 8]
xor eax, eax
push ebx
xor ebx, ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x10], ebx
xor esi, esi
mov dword [ebp - 0xc], edi
cmp dword [ebp + 0x28], 2
mov dword [ebp - 4], ebx
setne al
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], ebx
lea eax, [eax*8 + 0x18]
mov dword [ebp - 0x1c], eax
test ecx, ecx
je 0x4225a0
push 0x4750e4
push ecx
call sub.MSVCRT.dll__wfopen
mov ebx, eax
add esp, 8
mov dword [ebp - 0x10], ebx
jmp 0x4225c3
cdq
and edx, 7
add eax, edx
sar eax, 3
imul eax, dword [ebp + 0x10]
push 1
imul eax, dword [ebp + 0x14]
add eax, 0x8000
push eax
call fcn.00433cf0
mov edi, eax
mov dword [ebp - 0xc], edi
test ebx, ebx
jne 0x4225cf
test edi, edi
je 0x422899
push 0
push 0
push 0
push 0x4750dc
call fcn.00445fe0
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
je 0x422852
push 0x40
push sub.MSVCRT.dll_longjmp
push eax
call fcn.00441040
push 0
push eax
call sub.MSVCRT.dll__setjmp3
add esp, 0x14
test eax, eax
je 0x422660
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.004460c0
mov eax, dword [ebp - 0x14]
add esp, 8
test eax, eax
je 0x422629
push eax
call fcn.00432b95
add esp, 4
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x42264d
push eax
call sub.MSVCRT.dll_fclose
add esp, 4
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
push dword [ebp - 0xc]
call fcn.00433ef0
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
mov ebx, dword [ebp - 0x10]
test ebx, ebx
je 0x422675
push ebx
push dword [ebp - 4]
call fcn.0043c7e0
add esp, 8
jmp 0x422687
push dword [ebp - 0xc]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 4]
call fcn.004228e0
add esp, 0xc
push dword [ebp - 4]
call fcn.0043b6f0
push 8
push 0
push dword [ebp - 4]
mov dword [ebp - 8], eax
call fcn.00446a60
push 9
push dword [ebp - 4]
call fcn.00446a40
mov ecx, dword [ebp + 0x24]
add esp, 0x18
lea eax, [ecx - 1]
cmp eax, 7
ja 0x4227b6
push dword [ebp + 0x20]
mov esi, dword [ebp + 0x10]
mov eax, 1
push ecx
push dword [ebp + 0x18]
shl eax, cl
push dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
push dword [ebp + 0x14]
push esi
push dword [ebp + 0xc]
call fcn.004329da
push 0
push 0
push 0
push 3
push dword [ebp + 0x24]
mov edi, eax
push dword [ebp + 0x14]
mov dword [ebp - 0x14], edi
push esi
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.00448010
mov eax, dword [ebp - 0x18]
add esp, 0x40
test eax, eax
jle 0x422732
lea ecx, [ebp - 0x323]
mov esi, eax
lea edx, [edi + 0x51]
movzx eax, byte [edx + 1]
lea edx, [edx + 4]
mov byte [ecx - 1], al
lea ecx, [ecx + 3]
movzx eax, byte [edx - 4]
mov byte [ecx - 3], al
movzx eax, byte [edx - 5]
mov byte [ecx - 2], al
dec esi
jne 0x422711
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x324]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.004480d0
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.00447530
add esp, 0x18
test byte [ebp + 0x1c], 2
je 0x422784
mov esi, dword [ebp + 0x14]
dec esi
js 0x4227ab
nop
push esi
push edi
call fcn.00432be1
push eax
push dword [ebp - 4]
call fcn.00447940
add esp, 0x10
dec esi
jns 0x422760
push edi
call fcn.00432b95
add esp, 4
jmp 0x422832
xor esi, esi
cmp dword [ebp + 0x14], esi
jle 0x4227ab
mov ebx, dword [ebp + 0x14]
mov edi, edi
push esi
push edi
call fcn.00432be1
push eax
push dword [ebp - 4]
call fcn.00447940
inc esi
add esp, 0x10
cmp esi, ebx
jl 0x422790
mov ebx, dword [ebp - 0x10]
push edi
call fcn.00432b95
add esp, 4
jmp 0x422832
mov esi, dword [ebp + 0x14]
push 0
push 0
push 0
push dword [ebp + 0x28]
push 8
push esi
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.00448010
push dword [ebp - 4]
call fcn.00445e50
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.00447530
add esp, 0x30
test byte [ebp + 0x1c], 2
je 0x422814
lea edi, [esi - 1]
imul edi, dword [ebp + 0x18]
add edi, dword [ebp + 0xc]
test esi, esi
jle 0x422832
lea ecx, [ecx]
push edi
push dword [ebp - 4]
call fcn.00447940
sub edi, dword [ebp + 0x18]
add esp, 8
dec esi
jne 0x422800
jmp 0x422832
mov edi, dword [ebp + 0xc]
test esi, esi
jle 0x422832
jmp 0x422820
push edi
push dword [ebp - 4]
call fcn.00447940
add edi, dword [ebp + 0x18]
add esp, 8
dec esi
jne 0x422820
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.00446cf0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.004460c0
add esp, 0x10
mov esi, 1
test ebx, ebx
je 0x422877
push ebx
call sub.MSVCRT.dll_fclose
add esp, 4
test esi, esi
jne 0x422899
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
test esi, esi
je 0x422891
push dword [ebp - 0x20]
push dword [ebp - 0xc]
call fcn.00434050
mov esi, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24
push dword [ebp - 0xc]
call fcn.00433ef0
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x24