Function at 0x409551
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8c
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 8]
mov ebx, edx
mov dword [esp], eax
mov esi, ecx
call fcn.0040927f
mov dword [esp + 4], 5
mov dword [esp + 8], eax
mov edi, eax
lea eax, [ebp - 0x54]
mov dword [esp], eax
call fcn.0040946e
test eax, eax
je 0x409810
call fcn.00409372
cmp eax, 3
je 0x4095a8
mov dword [esp], 0
call fcn.0040927f
mov edi, eax
lea eax, [ebp - 0x38]
test esi, esi
mov dword [ebp - 0x60], eax
jne 0x4095b9
mov dword [ebp - 0x60], 0
mov eax, dword [ebp - 0x54]
test eax, eax
jns 0x4095d9
mov dword [esp + 8], edi
mov dword [esp + 4], 0x48
mov dword [esp], eax
call sub.KERNEL32.dll_MulDiv
sub esp, 0xc
neg eax
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x5c]
movzx ebx, bx
mov dword [esp + 4], ebx
mov dword [esp + 8], 5
mov dword [esp], eax
call sub.KERNEL32.dll_FindResourceA
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x409810
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp], eax
call sub.KERNEL32.dll_LoadResource
mov dword [ebp - 0x68], eax
test eax, eax
push esi
push esi
je 0x409810
mov eax, dword [ebp - 0x5c]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.KERNEL32.dll_SizeofResource
shr eax, 1
push edx
mov edi, eax
push edx
mov eax, dword [ebp - 0x68]
mov dword [esp], eax
call sub.KERNEL32.dll_LockResource
test edi, edi
mov esi, eax
push ecx
je 0x40964a
test eax, eax
jne 0x409651
xor ebx, ebx
jmp 0x4097aa
call sub.KERNEL32.dll_GetProcessHeap
lea edx, [edi + edi + 0x40]
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.KERNEL32.dll_HeapAlloc
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x40964a
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0041d470
cmp word [ebx + 2], 0xffff
jne 0x4096d7
cmp word [ebx], 1
jne 0x4096d7
lea esi, [ebx + 0x1a]
mov eax, esi
call fcn.00409258
add eax, eax
add esi, eax
mov eax, esi
call fcn.00409258
add eax, eax
add esi, eax
mov eax, esi
call fcn.00409258
add eax, eax
test byte [ebx + 0xc], 0x48
lea ecx, [esi + eax]
je 0x409719
lea esi, [ecx + 6]
mov dword [ebp - 0x6c], ecx
mov eax, esi
call fcn.00409258
mov ecx, dword [ebp - 0x6c]
mov edx, ecx
lea ecx, [ecx + eax*2 + 6]
jmp 0x40971d
lea esi, [ebx + 0x12]
mov eax, esi
call fcn.00409258
add eax, eax
add esi, eax
mov eax, esi
call fcn.00409258
add eax, eax
add esi, eax
mov eax, esi
call fcn.00409258
add eax, eax
test byte [ebx], 0x40
lea ecx, [esi + eax]
je 0x409719
lea esi, [ecx + 2]
mov dword [ebp - 0x6c], ecx
mov eax, esi
call fcn.00409258
mov ecx, dword [ebp - 0x6c]
mov edx, ecx
lea ecx, [ecx + eax*2 + 2]
jmp 0x40971d
xor esi, esi
xor edx, edx
mov dword [esp + 4], 4
mov dword [esp], ecx
mov dword [ebp - 0x6c], edx
call fcn.00405e61
cmp dword [ebp - 0x60], 0
mov edx, dword [ebp - 0x6c]
je 0x40979a
test esi, esi
je 0x40979a
mov dword [ebp - 0x70], eax
sub eax, ebx
sar eax, 1
mov dword [ebp - 0x74], edx
sub edi, eax
mov eax, dword [ebp - 0x60]
mov dword [esp], eax
mov dword [ebp - 0x6c], edi
call fcn.00407d8c
mov dword [esp], eax
mov edi, eax
call sub.msvcrt.dll_wcslen
mov dword [esp + 4], 4
lea eax, [esi + eax*2 + 2]
mov dword [esp], eax
call fcn.00405e61
mov edx, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x70]
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.0041d4b0
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll_wcscpy
mov edx, dword [ebp - 0x74]
cmp dword [ebp - 0x64], 0
je 0x4097aa
test edx, edx
je 0x4097aa
mov eax, dword [ebp - 0x64]
mov word [edx], ax
mov eax, dword [ebp - 0x68]
mov dword [esp], eax
call sub.KERNEL32.dll_FreeResource
test ebx, ebx
push eax
je 0x409810
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], ebx
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x5c]
cmp dword [ebp + 0x14], 0
mov dword [esp], eax
je 0x4097e6
call sub.USER32.dll_DialogBoxIndirectParamA
jmp 0x4097eb
call sub.USER32.dll_CreateDialogIndirectParamA
sub esp, 0x14
mov esi, eax
call sub.KERNEL32.dll_GetProcessHeap
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.KERNEL32.dll_HeapFree
mov eax, esi
sub esp, 0xc
jmp 0x409812
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret