Function at 0x403330
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x40a018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x10
mov esi, ecx
call dword [sym.imp.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_]
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x403368
xor ecx, ecx
mov dword [eax + 0xc], ebx
mov dword [eax], ecx
mov byte [eax + 4], cl
mov dword [eax + 8], ebx
jmp 0x40336a
xor eax, eax
push esi
mov edi, eax
mov dword [0x40ff34], eax
call fcn.004036b0
test al, al
jne 0x40338e
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004057d1
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [0x40ff34]
mov al, byte [esi + 4]
movzx ecx, word [esi + 2]
mov byte [ebp - 0x115], al
xor eax, eax
xor edx, edx
mov dword [ebp - 0x11c], eax
cmp dx, cx
jae 0x40352c
cmp ax, cx
jae 0x403518
mov ecx, dword [esi + 8]
movzx ebx, ax
mov edi, dword [ecx + ebx*4]
test edi, edi
je 0x403518
movzx eax, byte [ebp - 0x115]
dec eax
je 0x403419
sub eax, 2
je 0x4033ff
dec eax
jne 0x40342e
push eax
push edi
call dword [sym.imp.MSVCR100.dll__access]
add esp, 8
test eax, eax
jne 0x403428
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x403428
mov edx, dword [edi + 0x108]
mov eax, dword [edi + 0x10c]
push edx
push eax
mov ecx, edi
call fcn.004017b0
add esp, 8
jmp 0x403420
mov eax, edi
call fcn.004035b0
test al, al
je 0x40337b
mov esi, dword [0x40ff34]
push 0x104
lea ecx, [ebp - 0x110]
push 0
push ecx
call sub.MSVCR100.dll_memset
movzx edx, word [esi + 2]
inc ebx
mov dword [ebp - 0x114], ebx
add esp, 4
mov edi, str.PATCH_PROGRESS
fild dword [ebp - 0x114]
mov dword [ebp - 0x114], edx
fild dword [ebp - 0x114]
fdivp st(1)
fmul qword [0x407eb0]
fstp dword [ebp - 0x114]
fld dword [ebp - 0x114]
fstp qword [esp]
call fcn.004011c0
push eax
push str._s_.0f_____
lea eax, [ebp - 0x110]
push 0x104
push eax
call dword [sym.imp.MSVCR100.dll_sprintf_s]
lea ecx, [ebp - 0x110]
push ecx
push 0x400
push 0x40f638
call dword [sym.imp.MSVCR100.dll__snprintf]
fld dword [ebp - 0x114]
fnstcw word [ebp - 0x112]
add esp, 0x24
movzx eax, word [ebp - 0x112]
or eax, 0xc00
mov dword [ebp - 0x124], eax
mov eax, dword [0x40a5b8]
push 1
fldcw word [ebp - 0x124]
push 0
push 0
push eax
mov dword [0x40a62c], 0x64
fistp qword [ebp - 0x128]
mov edx, dword [ebp - 0x128]
mov dword [0x40a5bc], edx
fldcw word [ebp - 0x112]
call dword [sym.imp.USER32.dll_RedrawWindow]
mov esi, dword [0x40ff34]
mov eax, dword [ebp - 0x11c]
movzx ecx, word [esi + 2]
inc eax
mov dword [ebp - 0x11c], eax
cmp ax, cx
jb 0x4033c4
movzx ecx, word [esi]
mov dword [0x40fedc], ecx
lea ecx, [esi + 2]
xor edx, edx
mov byte [0x40ff3d], 1
xor edi, edi
mov dword [ebp - 0x124], ecx
cmp dx, word [ecx]
jae 0x403589
lea ebx, [esi + 8]
mov eax, dword [ebx]
movzx esi, di
add esi, esi
add esi, esi
mov eax, dword [esi + eax]
test eax, eax
je 0x40357a
push eax
call dword [sym.imp.MSVCR100.dll_void___cdecl_operator_delete_void__]
mov ecx, dword [ebx]
mov dword [esi + ecx], 0
mov ecx, dword [ebp - 0x124]
add esp, 4
inc edi
cmp di, word [ecx]
jb 0x403551
cmp byte [0x40ff3d], 0
je 0x403593
push 0x40fe98
call fcn.00404d00
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.004057d1
mov esp, ebp
pop ebp
ret