Function at 0x501640
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51b504
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x2802c
call fcn.0050adb0
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0x10], esp
push 0xc
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
call fcn.0050b1d3
add esp, 4
mov dword [ebp - 0x24], eax
cmp eax, esi
mov dword [ebp - 4], esi
je 0x501699
push str._hive...
mov ecx, eax
call fcn.004f8c20
jmp 0x50169b
xor eax, eax
cmp eax, esi
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x5016b3
push 0x8007000e
call fcn.0051a3e0
mov ebx, 1
push 0xc
mov dword [ebp - 4], ebx
call fcn.0050b1d3
add esp, 4
mov dword [ebp - 0x24], eax
cmp eax, esi
mov byte [ebp - 4], 2
je 0x5016dd
mov ecx, dword [ebp + 0x14]
push ecx
mov ecx, eax
call fcn.004f8c20
jmp 0x5016df
xor eax, eax
cmp eax, esi
mov byte [ebp - 4], bl
mov dword [ebp - 0x28], eax
jne 0x5016f3
push 0x8007000e
call fcn.0051a3e0
push 0xc
mov byte [ebp - 4], 3
call fcn.0050b1d3
add esp, 4
mov dword [ebp - 0x24], eax
cmp eax, esi
mov byte [ebp - 4], 4
je 0x50171a
push str.Dumping
mov ecx, eax
call fcn.004f8c20
jmp 0x50171c
xor eax, eax
cmp eax, esi
mov byte [ebp - 4], 3
mov dword [ebp - 0x20], eax
jne 0x501731
push 0x8007000e
call fcn.0051a3e0
lea edx, [ebp - 0x28]
lea eax, [ebp - 0x34]
push edx
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 5
call fcn.004f8a30
lea ecx, [ebp - 0x14]
lea edx, [ebp - 0x38]
push ecx
push edx
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.004f8a30
mov eax, dword [eax]
mov byte [ebp - 4], 7
cmp eax, esi
je 0x501766
mov ebx, dword [eax]
jmp 0x501768
xor ebx, ebx
mov edi, dword [ebp + 8]
lea esi, [edi + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push ebx
mov ecx, edi
call fcn.004f8950
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x38]
call fcn.004f8bd0
lea ecx, [ebp - 0x34]
call fcn.004f8bd0
lea ecx, [ebp - 0x20]
call fcn.004f8bd0
lea ecx, [ebp - 0x28]
call fcn.004f8bd0
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
call fcn.004f8bd0
mov ebx, dword [ebp + 0x10]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, dword [ebp + 0xc]
push 0
push ebx
push eax
call fcn.004fb1f0
add esp, 0xc
test eax, eax
je 0x50184a
lea ecx, [ebp + 0xc]
push eax
push ecx
call fcn.005027a0
lea edx, [ebp + 0xc]
lea eax, [ebp + 8]
push edx
push str.Error_dumping_hive:
push eax
mov dword [ebp - 4], 8
call fcn.00501a70
add esp, 0x14
mov eax, dword [eax]
mov byte [ebp - 4], 9
test eax, eax
je 0x501804
mov eax, dword [eax]
jmp 0x501806
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
push 0
push eax
push ecx
mov ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x30]
push edx
mov edx, dword [edi + 4]
push eax
push ecx
push 2
push edx
call fcn.00504050
add esp, 0x20
lea ecx, [ebp + 8]
call fcn.004f8bd0
lea ecx, [ebp + 0xc]
call fcn.004f8bd0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x10
call fcn.0050b1d3
mov esi, eax
add esp, 4
mov dword [ebp + 0x10], esi
test esi, esi
mov dword [ebp - 4], 0xa
je 0x5018b1
push 0
push 0
push 3
push 0
push 0
push SysReAllocString
push ebx
call fcn.004fb080
push 0
push eax
mov dword [esi], eax
call fcn.004fb3a0
push 0
push 0
mov dword [esi + 0xc], eax
mov eax, dword [esi]
push 0
push 2
push 0
push eax
call fcn.004fb260
push 0
push 0
push 0
push 4
push eax
mov dword [esi + 4], eax
call fcn.004fb2f0
add esp, 0x50
mov dword [esi + 8], eax
jmp 0x5018b3
xor esi, esi
mov eax, dword [esi + 8]
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0xffffffff
jne 0x501962
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp + 0xc]
push eax
push ecx
call fcn.005027a0
lea edx, [ebp + 0xc]
lea eax, [ebp + 8]
push edx
mov ebx, 0xb
push str.Error_mapping_hive_file:
push eax
mov dword [ebp - 4], ebx
call fcn.00501a70
add esp, 0x14
mov eax, dword [eax]
mov byte [ebp - 4], 0xc
test eax, eax
je 0x501905
mov eax, dword [eax]
jmp 0x501907
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
push 0
push eax
push ecx
mov ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x30]
push edx
mov edx, dword [edi + 4]
push eax
push ecx
push 2
push edx
call fcn.00504050
add esp, 0x20
lea ecx, [ebp + 8]
mov byte [ebp - 4], bl
call fcn.004f8bd0
test esi, esi
je 0x501947
mov ecx, esi
call fcn.00501a40
push esi
call fcn.0050b1c8
add esp, 4
lea ecx, [ebp + 0xc]
call fcn.004f8bd0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [eax + 0x24]
mov dword [ebp - 0x3c], ecx
mov word [ebp - 0x2803c], cx
lea ecx, [ebp - 0x2803c]
lea ebx, [edx + eax + 0x1000]
mov eax, dword [ebp + 0x14]
push eax
push ecx
mov byte [ebp + 0x13], 0
mov dword [ebp - 4], 0xd
call fcn.0050b20b
mov edx, dword [ebp + 0x14]
push edx
call fcn.0050b1ab
mov edx, dword [ebp + 0xc]
push 0
lea ecx, [ebp - 0x2803c]
mov dword [ebp - 0x3c], eax
mov eax, dword [esi + 8]
push 0
push ecx
push 0
push edx
add eax, 0x1000
push ebx
push eax
push edi
call fcn.00500570
add esp, 0x2c
mov bl, al
jmp 0x5019f9
test esi, esi
mov dword [ebp - 4], 0xffffffff
je 0x501a28
mov eax, dword [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esi + 4]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call edi
mov edx, dword [esi]
push edx
call edi
push esi
call fcn.0050b1c8
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
mov al, bl
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret