Function at 0x41f778
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb4
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov byte [ebp - 9], 0
push 0
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll__lopen
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0xffffffff
jne 0x41f7b6
mov edx, dword [ebp - 4]
mov ax, 1
call fcn.004acdac
mov byte [ebp - 9], 1
jmp 0x41fbc4
push 0
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll__lcreat
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x41f7e8
mov byte [ebp - 9], 3
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_CloseHandle_1
mov edx, dword [ebp - 8]
mov ax, 3
call fcn.004acdac
jmp 0x41fbc4
mov eax, dword [ebp - 0x28]
call fcn.004b22b8
fistp qword [ebp - 0x18]
wait
fild qword [ebp - 0x18]
fcomp dword [0x41fbd0]
fnstsw ax
sahf
jne 0x41f8b7
mov eax, dword [0x4be9e4]
cmp byte [eax], 0
jne 0x41f8b7
push 1
push 0x41fbd4
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll__hwrite
mov eax, dword [0x4bec60]
mov eax, dword [eax]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_lstrcmpA
test eax, eax
je 0x41f88d
mov eax, dword [0x4be784]
cmp byte [eax + 0x18ec], 0
jne 0x41f8a0
mov eax, dword [0x4be848]
cmp byte [eax], 0
jne 0x41f8a0
mov eax, dword [ebp - 4]
call fcn.004aed10
push eax
mov ax, 0xe4
call fcn.004aa600
pop edx
call fcn.004ae1b0
mov eax, dword [0x4bedb0]
mov edx, 0x24
call fcn.004b12a8
mov eax, dword [0x4bec68]
mov al, byte [eax]
mov edx, dword [0x4be784]
mov byte [edx + 0x18ec], al
jmp 0x41f8a0
mov ax, 0xe5
call fcn.004aa600
mov edx, 4
call fcn.004b12a8
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x41fbc4
test bl, bl
je 0x41f984
cmp bl, 8
je 0x41f8c9
cmp bl, 6
jne 0x41f8cf
mov byte [ebp - 0x2e], 0
jmp 0x41f8d3
mov byte [ebp - 0x2e], 1
cmp bl, 8
jne 0x41f8da
mov bl, 7
xor eax, eax
mov al, bl
add ax, 0xdd
dec eax
call fcn.004aa600
mov edx, eax
mov eax, dword [0x4bec98]
call fcn.004b81b0
cmp bl, 6
jae 0x41f971
mov eax, ebx
sub al, 2
je 0x41f905
sub al, 2
je 0x41f920
jmp 0x41f934
mov eax, dword [ebp - 8]
call fcn.004aed10
mov edx, eax
mov eax, dword [0x4bec98]
mov ecx, 0x3c
call fcn.004b820c
jmp 0x41f94d
mov eax, dword [0x4bec98]
mov ecx, 0x3c
mov edx, dword [ebp - 8]
call fcn.004b820c
jmp 0x41f94d
mov eax, dword [ebp - 4]
call fcn.004aed10
mov edx, eax
mov eax, dword [0x4bec98]
mov ecx, 0x3c
call fcn.004b820c
mov eax, dword [0x4be784]
movzx eax, byte [eax + 0x188c]
lea eax, [eax + eax*4]
mov edx, dword [0x4be720]
lea eax, [edx + eax]
push eax
mov eax, dword [0x4bec98]
push eax
call sub.kernel32.dll_lstrcatA
mov al, byte [ebp - 0x2e]
xor al, 1
mov edx, eax
add edx, edx
mov eax, dword [0x4bec98]
call fcn.004ad8ec
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x2d], 0
cmp dword [ebp + 8], 0
je 0x41f9bd
mov eax, dword [0x4be784]
cmp byte [eax + 0x18f1], 0
je 0x41f9bd
mov eax, dword [0x4be784]
mov al, byte [eax + 0x18f1]
mov byte [ebp - 0x2d], al
lea eax, [ebp - 0x48]
mov dl, byte [ebp - 0x2d]
call fcn.0040fadc
mov eax, 0xe000
call fcn.00402504
mov esi, eax
push 0xe000
push esi
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll__hread
mov edi, eax
cmp edi, 0xffffffff
jne 0x41f9f4
mov byte [ebp - 9], 2
mov edx, dword [ebp - 4]
mov ax, 2
call fcn.004acdac
jmp 0x41fb50
cmp byte [ebp - 0x2d], 0
je 0x41fa06
lea eax, [ebp - 0x48]
mov ecx, edi
mov edx, esi
call fcn.0040fbec
push edi
push esi
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll__hwrite
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x4c], edi
fild dword [ebp - 0x4c]
fild qword [ebp - 0x20]
faddp st(1)
fistp qword [ebp - 0x20]
wait
fild qword [ebp - 0x20]
fcomp dword [0x41fbd8]
fnstsw ax
sahf
jbe 0x41fa51
fild qword [ebp - 0x20]
fcomp dword [0x41fbdc]
fnstsw ax
sahf
jae 0x41fa51
cmp bl, 2
jne 0x41fa51
call fcn.00416d84
test al, al
je 0x41fb13
fild qword [ebp - 0x18]
fcomp dword [0x41fbd0]
fnstsw ax
sahf
jbe 0x41fa90
fild qword [ebp - 0x20]
fild qword [ebp - 0x18]
fdivp st(1)
fmul dword [0x41fbe0]
call fcn.004028e8
mov edx, dword [0x4be344]
mov byte [edx], al
mov eax, dword [0x4be344]
mov al, byte [eax]
mov edx, dword [0x4be8d0]
cmp al, byte [edx]
je 0x41fa90
call fcn.004b5c48
call fcn.004ae0a4
mov eax, dword [0x4bed48]
cmp byte [eax], 0
je 0x41fb06
cmp bl, 2
jne 0x41fb50
mov eax, dword [ebp - 8]
call fcn.004aed10
push eax
mov ax, 0xe6
call fcn.004aa600
pop edx
call fcn.004ae1b0
mov eax, dword [0x4bee20]
cmp byte [eax], 0
jbe 0x41fadf
mov ax, 0xe7
call fcn.004aa600
push eax
mov eax, dword [0x4bedb0]
push eax
call sub.kernel32.dll_lstrcatA
mov eax, dword [0x4bedb0]
mov edx, 2
call fcn.004b12a8
cmp al, 1
je 0x41fb50
mov eax, dword [0x4bec98]
xor edx, edx
call fcn.004ad8ec
mov eax, dword [0x4bed48]
mov byte [eax], 0
test edi, edi
je 0x41fb13
cmp edi, dword [ebp - 0x24]
je 0x41f9c9
mov eax, dword [0x4be344]
mov byte [eax], 0x64
call fcn.004b5c48
cmp byte [ebp - 0x2d], 0
je 0x41fb33
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, dword [ebp + 8]
call fcn.0040fd04
cmp edi, dword [ebp - 0x24]
je 0x41fb50
mov byte [ebp - 9], 5
mov edx, dword [ebp - 8]
mov ax, 5
call fcn.004acdac
mov eax, dword [0x4bed48]
mov byte [eax], 1
mov eax, esi
call fcn.00402524
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [0x4bed48]
cmp byte [eax], 0
je 0x41fb80
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_DeleteFileA_1
mov byte [ebp - 9], 0xff
test bl, bl
je 0x41fb89
call fcn.004adbe0
mov eax, dword [0x4bec44]
cmp byte [eax], 0
je 0x41fbc4
mov eax, dword [0x4bee20]
cmp byte [eax], 0
jbe 0x41fbc4
mov eax, dword [ebp - 8]
call fcn.004aed10
push eax
mov ax, 0xe8
call fcn.004aa600
pop edx
call fcn.004ae1b0
mov eax, dword [0x4bedb0]
mov edx, 4
call fcn.004b12a8
mov al, byte [ebp - 9]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4