Function at 0x409890
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [ebp + 0xc]
xorps xmm0, xmm0
push edi
mov dword [ebp - 0x10], edx
mov edi, 1
mov dword [ebp - 0xc], ecx
lea ecx, [ebp - 0x30]
mov edx, dword [esi]
movups xmmword [ebp - 0x30], xmm0
mov dword [ebp - 0x18], 0
movq qword [ebp - 0x20], xmm0
mov dword [ebp - 4], edi
call fcn.00406f20
push dword [esi]
mov bl, al
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test bl, bl
je 0x409b0d
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ebx, dword [ebp + 0x18]
movzx eax, word [ebx]
add eax, eax
push eax
mov eax, dword [ebp + 0x10]
push dword [esi]
push dword [eax]
call fcn.0043c9e0
movzx eax, word [ebx]
add esp, 0xc
add eax, eax
push eax
mov eax, dword [ebp + 0x14]
push dword [esi]
push dword [eax]
call fcn.0043c9e0
movzx ecx, word [ebx]
add esp, 0xc
mov eax, dword [esi]
mov edx, dword [ebp - 0x28]
lea ecx, [eax + ecx*2]
test edx, edx
je 0x409935
movzx eax, word [ebp - 0x20]
lea eax, [eax*2 + 2]
push eax
push edx
push ecx
call fcn.0043c9e0
add esp, 0xc
jmp 0x409947
movups xmm0, xmmword [str._sfx_.dll]
movups xmmword [ecx], xmm0
mov eax, dword [0x44496c]
mov dword [ecx + 0x10], eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
mov dword [ebp - 0x14], edi
test edi, edi
je 0x40996d
push str.ApplyPatchToFileW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, eax
mov dword [ebp - 8], ecx
test ecx, ecx
jne 0x4099b2
mov eax, dword [ebp + 0x1c]
cmp byte [eax], 0
jne 0x4099a2
push str.MsPatchA.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, dword [ebp - 0x10]
mov dword [ecx], eax
mov eax, dword [ebp + 0x1c]
mov byte [eax], 1
mov eax, dword [ecx]
test eax, eax
je 0x4099a2
push str.ApplyPatchToFileW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x409a91
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x409a98
mov edi, dword [ebp - 0x1c]
add edi, 4
mov eax, dword [ebp - 0xc]
push 0
push 1
push dword [edi - 4]
mov eax, dword [eax + 4]
push 2
push eax
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
movzx eax, word [edi + 0xa]
movzx ecx, word [ebx]
lea eax, [eax*2 + 2]
push eax
mov eax, dword [ebp + 0x10]
push dword [edi]
mov eax, dword [eax]
lea eax, [eax + ecx*2]
push eax
call fcn.0043c9e0
movzx eax, word [edi + 0xc]
add esp, 0xc
movzx ecx, word [ebx]
lea eax, [eax*2 + 2]
push eax
mov eax, dword [ebp + 0x14]
push dword [edi + 4]
mov eax, dword [eax]
lea eax, [eax + ecx*2]
push eax
call fcn.0043c9e0
movzx eax, word [edi + 8]
add esp, 0xc
movzx ecx, word [ebx]
lea eax, [eax*2 + 2]
push eax
mov eax, dword [esi]
push dword [edi - 4]
lea eax, [eax + ecx*2]
push eax
call fcn.0043c9e0
mov eax, dword [ebp + 0x14]
add esp, 0xc
push 0
push dword [esi]
push dword [eax]
mov eax, dword [ebp + 0x10]
push dword [eax]
call dword [ebp - 8]
mov dword [ebp - 4], eax
test eax, eax
jne 0x409a7f
movzx edx, word [ebx]
add dx, word [edi + 8]
mov ecx, dword [esi]
call fcn.00405eb0
mov eax, dword [ebp + 0x14]
push 0
push dword [esi]
push dword [eax]
mov eax, dword [ebp + 0x10]
push dword [eax]
call dword [ebp - 8]
mov dword [ebp - 4], eax
add edi, 0x14
sub dword [ebp - 0x10], 1
jne 0x4099c6
mov edi, dword [ebp - 0x14]
jmp 0x409a98
mov dword [ebp - 4], 0
test edi, edi
je 0x409aa3
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, dword [ebp - 0x18]
xor ebx, ebx
cmp dword [ebp - 4], ebx
je 0x409ae4
nop dword [eax]
cmp ebx, dword [ebp - 0x2c]
jae 0x409ae4
movzx eax, word [edi + 4]
lea eax, [eax*2 + 2]
push eax
mov eax, dword [ebp + 0x18]
push dword [edi]
movzx ecx, word [eax]
mov eax, dword [esi]
lea eax, [eax + ecx*2]
push eax
call fcn.0043c9e0
mov ecx, dword [esi]
add esp, 0xc
call fcn.004074b0
inc ebx
add edi, 8
jmp 0x409ab0
mov eax, dword [ebp + 0x18]
movups xmm0, xmmword [str._sfx_.dll]
movzx ecx, word [eax]
mov eax, dword [esi]
movups xmmword [eax + ecx*2], xmm0
lea ecx, [eax + ecx*2]
mov eax, dword [0x44496c]
mov dword [ecx + 0x10], eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [ebp - 4]
lea ecx, [ebp - 0x30]
call fcn.00406e80
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret