Function at 0x551b16
Capabilities:
Delete file
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x398]
sub esp, 0x418
mov eax, dword [0x614b80]
xor eax, ebp
mov dword [ebp + 0x394], eax
push ebx
push esi
mov eax, ecx
push edi
lea ecx, [eax + 0xa10]
push ecx
mov dword [ebp - 0x74], eax
add eax, 0x610
push eax
push 0x5c0cd4
mov esi, 0x200
lea eax, [ebp + 0x194]
push esi
push eax
call fcn.00439b20
mov edi, dword [sym.imp.KERNEL32.DLL_CreateFileA]
add esp, 0x14
xor ebx, ebx
push ebx
push 2
push 3
push ebx
push ebx
push SysReAllocString
lea eax, [ebp + 0x194]
push eax
call edi
mov dword [ebp - 0x70], eax
cmp eax, 0xffffffff
je 0x551ba4
push str._bExtract_VXD__File_already_present_n
push dword [ebp - 0x74]
call fcn.00550c05
pop ecx
pop ecx
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor eax, eax
jmp 0x551d65
push dword [ebp + 0x3a0]
call fcn.00551b0b
pop ecx
test eax, eax
jne 0x551bbe
mov eax, 0x5007
jmp 0x551d65
mov eax, dword [ebp - 0x74]
add eax, 0x810
cmp byte [eax], bl
je 0x551cf9
push eax
lea eax, [ebp - 0x6c]
push esi
push eax
call fcn.0057a7c3
add esp, 0xc
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
mov dword [ebp - 0x70], eax
cmp eax, ebx
je 0x551d0d
mov ecx, dword [ebp - 0x74]
movzx ecx, word [ecx + 0xd48]
push 0xa
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_FindResourceA]
mov dword [ebp - 0x78], eax
cmp eax, ebx
je 0x551d0d
push eax
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.DLL_LoadResource]
cmp eax, ebx
je 0x551d0d
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
push dword [ebp - 0x78]
mov dword [ebp - 0x7c], eax
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
mov dword [ebp - 0x78], eax
cmp eax, ebx
je 0x551d0d
push ebx
push 2
push 2
push ebx
push ebx
push 0xc0000000
lea eax, [ebp + 0x194]
push eax
call edi
mov dword [ebp - 0x70], eax
cmp eax, 0xffffffff
jne 0x551d25
call dword [sym.imp.KERNEL32.DLL_GetLastError]
lea eax, [ebp + 0x194]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
push ebx
push 2
push 2
push ebx
push ebx
push 0xc0000000
lea eax, [ebp + 0x194]
push eax
call edi
mov dword [ebp - 0x70], eax
cmp eax, 0xffffffff
jne 0x551d25
push esi
lea eax, [ebp + 0x194]
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
push 0x5a0618
lea eax, [ebp + 0x194]
push esi
push eax
call fcn.00439c00
mov eax, dword [ebp - 0x74]
add eax, 0xa10
push eax
lea eax, [ebp + 0x194]
push esi
push eax
call fcn.00439c00
add esp, 0x18
push ebx
push 2
push 2
push ebx
push ebx
push 0xc0000000
lea eax, [ebp + 0x194]
push eax
call edi
mov dword [ebp - 0x70], eax
cmp eax, 0xffffffff
jne 0x551d15
call dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x551b9d
push esi
lea eax, [ebp - 0x6c]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x551bdc
call dword [sym.imp.KERNEL32.DLL_GetLastError]
jmp 0x551d65
mov eax, dword [ebp - 0x74]
push esi
add eax, 0x610
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
push ebx
lea eax, [ebp - 0x80]
push eax
push dword [ebp - 0x78]
push dword [ebp - 0x7c]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push dword [ebp - 0x80]
mov esi, eax
push str._bExtract_VXD__WriteFile_returned__d_bytes._n
push dword [ebp - 0x74]
call fcn.00550c05
add esp, 0xc
cmp esi, ebx
jne 0x551d5a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov ebx, eax
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp + 0x394]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0057943e
add ebp, 0x398
leave
ret 4