Function at 0x406640
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4628f0
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x48672c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
movzx esi, word [ebp + 8]
mov eax, dword [0x488060]
mov ebx, dword [sym.imp.KERNEL32.dll_FindResourceW]
push 0xf0
push esi
mov edi, ecx
push eax
mov dword [ebp - 0x44], edi
call ebx
xor ecx, ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x28], ecx
cmp eax, ecx
je 0x4066b0
mov ecx, dword [0x488060]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4066b0
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x38], eax
mov edx, dword [0x488060]
push 5
push esi
push edx
call ebx
test eax, eax
je 0x4068d5
push eax
mov eax, dword [0x488060]
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4068f9
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
je 0x4068f9
movzx ecx, word [eax + 2]
xor ebx, ebx
mov edx, 0xffff
cmp cx, dx
sete bl
cmp cx, dx
lea ecx, [eax + 0x10]
mov dword [ebp - 0x30], ebx
je 0x406707
lea ecx, [eax + 8]
movzx esi, word [ecx]
push eax
mov dword [ebp - 0x48], esi
call fcn.00404880
add esp, 4
mov ebx, eax
mov eax, dword [edi + 4]
push 5
push eax
call dword [sym.imp.USER32.dll_GetWindow]
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], ecx
cmp dx, si
jae 0x406900
cmp dword [ebp - 0x30], 0
je 0x406748
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x34], eax
lea eax, [ebx + 0x18]
jmp 0x406752
movzx edx, word [ebx + 0x10]
mov dword [ebp - 0x34], edx
lea eax, [ebx + 0x12]
cmp word [eax], 0x7b
jne 0x4068a1
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
lea eax, [ebp - 0x24]
push eax
push ecx
push edx
mov dword [ebp - 0x24], 0
call fcn.00404990
mov edi, eax
xor eax, eax
add esp, 0xc
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], eax
cmp edi, eax
je 0x4067c2
push edi
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x4068da
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [ebp - 0x24]
push edi
push ecx
push edi
push eax
call fcn.00404670
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea edx, [ebp - 0x2c]
push edx
push 1
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
push eax
push ecx
mov byte [ebp - 4], 1
call fcn.00404f70
add esp, 8
mov dword [ebp - 0x28], eax
test eax, eax
js 0x40687f
cmp dword [ebp - 0x30], 0
je 0x4067f7
movzx eax, word [ebx + 0xc]
lea esi, [ebx + 0x18]
jmp 0x4067fe
movzx eax, word [ebx + 8]
lea esi, [ebx + 0x12]
mov edi, dword [ebp - 0x30]
movsx edx, ax
mov dword [ebp - 0x20], edx
test edi, edi
je 0x406811
movzx eax, word [ebx + 0xe]
jmp 0x406815
movzx eax, word [ebx + 0xa]
movsx ecx, ax
mov dword [ebp - 0x1c], ecx
test edi, edi
je 0x406825
movzx eax, word [ebx + 0x10]
jmp 0x406829
movzx eax, word [ebx + 0xc]
cwde
add eax, edx
mov dword [ebp - 0x18], eax
test edi, edi
je 0x406839
movzx eax, word [ebx + 0x12]
jmp 0x40683d
movzx eax, word [ebx + 0xe]
mov edi, dword [ebp - 0x44]
movsx edx, ax
add edx, ecx
mov ecx, dword [edi + 4]
lea eax, [ebp - 0x20]
push eax
push ecx
mov dword [ebp - 0x14], edx
call dword [sym.imp.USER32.dll_MapDialogRect]
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x24]
push edx
push eax
push esi
lea ecx, [edi + 0x20]
call fcn.0041f600
test eax, eax
je 0x40687f
mov ecx, dword [ebp - 0x2c]
push ecx
push 0
lea edx, [ebp - 0x20]
push edx
mov ecx, eax
call fcn.00406510
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x4068b5
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
jmp 0x4068b5
test cx, cx
je 0x4068b5
mov eax, dword [ebp - 0x3c]
push 2
push eax
call dword [sym.imp.USER32.dll_GetWindow]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x30]
push ecx
push ebx
call fcn.00404920
mov ecx, dword [ebp - 0x40]
inc ecx
add esp, 8
mov ebx, eax
mov dword [ebp - 0x40], ecx
cmp cx, word [ebp - 0x48]
jb 0x406737
mov eax, dword [ebp - 0x28]
jmp 0x406902
mov eax, dword [ebp - 0x2c]
mov esi, 0x8007000e
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x4068f5
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, esi
jmp 0x406902
call fcn.00404730
jmp 0x406902
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00434932
mov esp, ebp
pop ebp
ret 4