Function at 0x407790
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x288
cmp dword [esp + 0x298], 0
push ebx
push ebp
push esi
push edi
mov ebx, eax
mov esi, ecx
je 0x40792c
or ebp, 0xffffffff
cmp esi, 0x41
mov eax, str..PhysicalDrive_d
jl 0x4077be
mov eax, str.._c:
push esi
push eax
lea eax, [esp + 0x60]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
lea ecx, [esp + 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x407823
push 0
lea edx, [esp + 0x1c]
push edx
push 0x20
lea eax, [esp + 0x44]
push eax
push 0
push 0
push 0x560000
push edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x40781c
cmp dword [esp + 0x38], 0
jbe 0x40781c
mov ebp, dword [esp + 0x40]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x14], ebp
test ebp, ebp
jl 0x40792c
push 1
lea ecx, [esp + 0x9c]
push ecx
push 0
push ebp
call fcn.00406310
test eax, eax
je 0x407a34
lea edx, [esp + 0x34]
neg ebx
push edx
sbb ebx, ebx
push 0x409700
add ebx, 6
push ebx
call fcn.00401b30
mov esi, eax
test esi, esi
je 0x407a34
push 0x200
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
push eax
lea eax, [esp + 0xa0]
push eax
call fcn.00401a00
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
lea ecx, [esp + 0x1c]
push ecx
mov eax, ebp
call fcn.00406130
test eax, eax
je 0x407a34
cmp dword [esp + 0x30], 0x200
jne 0x407a34
mov eax, dword [esp + 0x2a0]
test eax, eax
jne 0x4078c2
mov byte [esp + 0x25a], 1
jmp 0x4078d3
cmp eax, 1
sete dl
lea edx, [edx + edx + 0xc]
mov byte [esp + 0x25a], dl
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
mov al, dl
dec al
mov byte [esp + 0x25b], al
mov eax, dword [esp + 0x1c]
mov bl, al
imul eax, edx
dec eax
imul eax, ecx
push 1
mov byte [esp + 0x260], cl
mov edi, ecx
mov dword [esp + 0x262], ecx
lea ecx, [esp + 0x9c]
dec bl
push ecx
mov byte [esp + 0x265], bl
push 0
mov ebx, eax
push ebp
mov dword [esp + 0x272], ebx
call fcn.004061b0
jmp 0x407a3c
lea edx, [esp + 0x10]
push edx
push 0
lea ebx, [esp + 0x20]
mov eax, esi
mov dword [esp + 0x18], 0
call fcn.00406060
mov ebp, eax
mov dword [esp + 0x14], ebp
test ebp, ebp
jl 0x4079e0
mov edi, dword [esp + 0x18]
test edi, edi
jbe 0x407a0a
push 1
lea eax, [esp + 0x9c]
push eax
push 0
push ebp
call fcn.00406310
test eax, eax
je 0x407a0a
mov ebx, dword [esp + 0x29c]
lea eax, [esp + 0x98]
call fcn.00407590
test eax, eax
je 0x407a0a
mov eax, dword [esp + 0x2a0]
mov byte [esp + 0x25a], 0xc
test eax, eax
jne 0x4079bf
push 1
lea ecx, [esp + 0x9c]
push ecx
push eax
push ebp
mov byte [esp + 0x26a], 1
call fcn.004061b0
jmp 0x407a0a
cmp eax, 1
jne 0x4079cc
mov byte [esp + 0x25a], 0xe
push 1
lea ecx, [esp + 0x9c]
push ecx
push 0
push ebp
call fcn.004061b0
jmp 0x407a0a
lea edx, [esp + 0x1c]
push edx
mov eax, esi
call fcn.00406130
test eax, eax
je 0x407a06
mov ebx, dword [esp + 0x1c]
imul ebx, dword [esp + 0x2c]
xor edi, edi
imul ebx, dword [esp + 0x28]
mov dword [esp + 0x14], esi
jmp 0x407a0e
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x10]
test ebx, ebx
jne 0x407a3c
mov eax, dword [esp + 0x29c]
push ebx
push 0x409c60
push eax
call fcn.00401c10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x288
ret 0x10
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x2a4]
xor ebp, ebp
cmp byte [eax], 0
je 0x407a55
lea ebp, [esp + 0x78]
mov esi, ebp
call fcn.00407710
mov eax, dword [esp + 0x2a0]
mov ecx, dword [esp + 0x29c]
cmp eax, 2
jne 0x407a86
push 0x66
push ebp
push ecx
mov ecx, edi
mov edi, dword [esp + 0x20]
mov eax, ebx
call fcn.004068a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x288
ret 0x10
mov edx, dword [esp + 0x14]
push ebp
push edx
push ecx
mov ecx, ebx
mov edx, edi
call fcn.004065e0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x288
ret 0x10