Function at 0x51b2360
Capabilities:
Extract resource via kernel32 functions
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5234546
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x53f3c3c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x24], edi
push 0x525342c
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, eax
cmp dword [edi + 0xe4], 0
jne 0x51b243e
push str._META__Hihi_I_am_primitive_OpenDB_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], 0
push str.primitive
push 0x80a
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x14], eax
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov dword [ebp - 0x20], edi
test ebx, ebx
je 0x51b2407
test edi, edi
je 0x51b2407
mov dword [ebp - 4], 0xffffffff
jmp 0x51b2497
mov dword [ebp - 0x18], 2
push 0x539c9a8
lea eax, [ebp - 0x18]
push eax
call sub.MSVCR90.dll__CxxThrowException
push str._META__META_Handle_FindResource_ODB_exception_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [ebp - 4], 0xffffffff
mov eax, 0x51b25fd
ret
push str._META__Hihi_I_am_primitive_EDB_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], 2
push str.primitive
push 0x7ef
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x14], eax
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov dword [ebp - 0x1c], ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
mov dword [ebp - 0x20], edi
test ebx, ebx
je 0x51b25c6
test edi, edi
je 0x51b25c6
mov dword [ebp - 4], 0xffffffff
push str._META__META_Primitive_Message_initing_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 4], 4
mov esi, dword [ebp - 0x24]
cmp dword [esi + 0x10], 0
jne 0x51b255d
push 0xc
cmp dword [esi + 0xe4], 0
jne 0x51b24e6
call sub.mfc90.dll_Ordinal_798
add esp, 4
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 5
test eax, eax
je 0x51b2504
push 1
mov ecx, eax
call fcn.05003bd0
jmp 0x51b2506
call sub.mfc90.dll_Ordinal_798
add esp, 4
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 6
test eax, eax
je 0x51b2504
push 0
mov ecx, eax
call fcn.05003bd0
jmp 0x51b2506
xor eax, eax
mov byte [ebp - 4], 4
mov dword [esi + 0x10], eax
push edi
push ebx
mov ecx, eax
call fcn.05003c80
test eax, eax
je 0x51b2543
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x51b2528
push 1
call fcn.051b22f0
mov dword [esi + 0x10], 0
push str._META__META_Primitive_Message_init_db_failed_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0
push 0
call sub.MSVCR90.dll__CxxThrowException
cmp dword [esi + 0x10], 0
jne 0x51b255d
push str._META__META_Primitive_Message_init_failed_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0
push 0
call sub.MSVCR90.dll__CxxThrowException
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [ebp - 4], 0xffffffff
push str._META__Primitive_Message_init_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x28], 2
push 0x539c9a8
lea ecx, [ebp - 0x28]
push ecx
call sub.MSVCR90.dll__CxxThrowException
push str._META__META_Handle_FindResource_exception_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov dword [ebp - 4], 0xffffffff
mov eax, 0x51b25fd
ret