Function at 0x406700
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceA]
push 0x41838c
mov ebx, ecx
push 0x3f1
push ebp
mov dword [esp + 0x20], ebx
call edi
test eax, eax
mov dword [esp + 0x10], 1
jne 0x406734
mov dword [esp + 0x10], eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x406748
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x406768
push 0
push 0x419c88
push str.Hey_you_dont_have_the_test_resoureces_set_up_properly
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0x18]
mov esi, dword [eax]
push str.PM_RESOURCE_TYPE_MAP
push 0x3f2
push ebp
mov dword [esp + 0x30], ecx
mov dword [ebx + 0x28], edx
call edi
test eax, eax
jne 0x406793
mov dword [esp + 0x10], eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4067a7
mov ecx, dword [esp + 0x10]
test ecx, ecx
jne 0x4067b3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, esi
dec esi
test ecx, ecx
je 0x406848
add ebx, 4
inc esi
mov edi, eax
mov dword [esp + 0x18], esi
push 0x14
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
xor esi, esi
add esp, 4
cmp eax, esi
je 0x4067f7
mov dword [eax + 4], esi
mov dword [eax + 0xc], esi
mov dword [eax + 0x10], esi
mov dword [eax], 0x4162f4
mov dword [eax + 8], 8
mov esi, eax
mov edx, dword [esp + 0x24]
xor ecx, ecx
xor eax, eax
mov cx, dx
mov dword [esi + 0xc], edx
mov al, byte [edi]
push 0x418090
push ecx
push ebp
mov dword [esi + 8], eax
inc edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi + 4], eax
mov edx, dword [ebx]
push esi
mov ecx, ebx
call dword [edx]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
inc ecx
dec eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], eax
jne 0x4067cf
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
push str.PM_URL_STRING
and eax, 0xffff
push eax
push ebp
call edi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40690f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
add ebx, 0x2c
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x406884
xor esi, esi
mov dword [esp + 0x18], esi
jmp 0x406895
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [esp + 0x18], eax
mov esi, eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebx]
cmp dword [ecx - 0xc], 1
lea edx, [ecx - 0xc]
jg 0x4068a5
cmp esi, dword [ecx - 4]
jle 0x4068e2
mov eax, dword [0x418014]
add ecx, 0xfffffff4
cmp ecx, eax
je 0x4068d2
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4068ca
mov ecx, dword [ebx]
sub ecx, 0xc
push ecx
call fcn.00415cb0
add esp, 4
mov edx, dword [0x418010]
mov dword [ebx], edx
push esi
mov ecx, ebx
call fcn.00401fc0
test eax, eax
je 0x40690b
mov eax, dword [esp + 0x1c]
mov edi, dword [ebx]
mov ecx, esi
mov esi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x18]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx]
mov edi, dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ecx - 8], eax
mov edx, dword [ebx]
mov byte [eax + edx], 0
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
push str.PM_APP_TITLE
inc eax
and eax, 0xffff
push eax
push ebp
call edi
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4069e5
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x406943
xor ebp, ebp
jmp 0x40694c
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebp, eax
mov eax, dword [ebx + 0x30]
mov edx, dword [eax - 0xc]
lea ecx, [eax - 0xc]
cmp edx, 1
jg 0x40695f
cmp ebp, dword [eax - 4]
jle 0x4069c1
mov edx, dword [0x418014]
add eax, 0xfffffff4
cmp eax, edx
je 0x40698f
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x406986
mov ecx, dword [ebx + 0x30]
sub ecx, 0xc
push ecx
call fcn.00415cb0
add esp, 4
mov edx, dword [0x418010]
mov dword [ebx + 0x30], edx
test ebp, ebp
jne 0x40699a
mov eax, dword [0x418010]
jmp 0x4069be
lea ecx, [ebp + 0xd]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x4069e5
mov dword [eax], 1
mov byte [eax + ebp + 0xc], 0
mov dword [eax + 4], ebp
mov dword [eax + 8], ebp
add eax, 0xc
mov dword [ebx + 0x30], eax
mov eax, dword [esp + 0x14]
mov ecx, ebp
mov edx, ecx
mov edi, dword [eax + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax + 0x30]
mov dword [ecx - 8], ebp
mov edx, dword [eax + 0x30]
mov byte [edx + ebp], 0
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4