Function at 0x402870
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xffffffffffffffff
push 0x412dea
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc8
push ebx
push ebp
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x28], ebx
mov al, byte [esp + 0x13]
push ebx
lea ecx, [esp + 0x1c]
mov dword [esp + 0xe4], 2
mov byte [esp + 0x1c], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov cl, byte [esp + 0x13]
push ebx
mov byte [esp + 0x30], cl
lea ecx, [esp + 0x30]
mov byte [esp + 0xe4], 3
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov byte [esp + 0xe0], 4
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [esp + 0xec]
mov esi, dword [eax + 8]
mov edx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
cmp ecx, ebx
jne 0x4028f1
mov ecx, edx
mov eax, dword [esp + 0xfc]
cmp eax, ebx
jne 0x4028fe
mov eax, edx
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp ebp, ebx
mov dword [esp + 0x14], eax
jne 0x402999
push 1
lea ecx, [esp + 0x30]
mov byte [esp + 0xe4], 3
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x1c]
mov byte [esp + 0xe4], 2
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0xec]
mov byte [esp + 0xe4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0xfc]
mov byte [esp + 0xe4], bl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x10c]
mov dword [esp + 0xe4], 0xffffffff
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
xor al, al
jmp 0x402c6f
push ebp
call dword [sym.imp.KERNEL32.dll_LockResource]
push 1
lea edx, [esp + 0x17]
push ebx
push edx
lea ecx, [esp + 0x114]
mov ebp, eax
mov byte [esp + 0x1f], 0x5c
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_char_const___unsigned_int__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
cmp eax, dword [ecx]
jne 0x402a5f
lea eax, [esp + 0xc8]
push eax
call fcn.00402c90
add esp, 4
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov byte [esp + 0xe0], 5
mov edx, dword [ecx]
lea ecx, [esp + 0x2c]
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
push 1
lea ecx, [esp + 0xcc]
mov byte [esp + 0xe4], 4
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x419154
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x419154
lea ecx, [esp + 0x34]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_char_const___unsigned_int_]
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
lea ecx, [esp + 0x18]
push edx
push ebx
push eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov eax, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea edx, [esp + 0x108]
mov ecx, dword [eax]
push ecx
push ebx
push edx
lea ecx, [esp + 0x24]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::append_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
jmp 0x402a75
mov eax, dword [ecx]
lea ecx, [esp + 0x108]
push eax
push ebx
push ecx
lea ecx, [esp + 0x24]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
mov esi, dword [esp + 0x1c]
cmp esi, ebx
jne 0x402a83
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
mov edx, dword [sym.imp.MSVCP60.dll_const_std::basic_ofstream_char__struct_std::char_traits_char__::vbtable]
lea ecx, [esp + 0x94]
mov dword [esp + 0x3c], edx
call dword [sym.imp.MSVCP60.dll_protected:_void___thiscall_std::ios_base::constructor_void_]
mov eax, dword [sym.imp.MSVCP60.dll_const_std::basic_ios_char__struct_std::char_traits_char__::vftable]
mov dword [esp + 0x28], 1
mov dword [esp + 0x94], eax
push ebx
push 1
lea ecx, [esp + 0x48]
push ebx
push ecx
lea ecx, [esp + 0x4c]
mov byte [esp + 0xf0], 6
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ostream_char__struct_std::char_traits_char__::constructor_class_std::basic_streambuf_char__struct_std::char_traits_char_____bool__bool_]
push ebx
lea ecx, [esp + 0x44]
mov dword [esp + 0xe4], 7
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_filebuf_char__struct_std::char_traits_char__::constructor_struct__iobuf__]
mov edx, dword [esp + 0x3c]
mov ecx, dword [sym.imp.MSVCP60.dll_const_std::basic_ofstream_char__struct_std::char_traits_char__::vftable]
push 0x22
push esi
mov eax, dword [edx + 4]
mov byte [esp + 0xe8], 8
mov dword [esp + eax + 0x44], ecx
lea ecx, [esp + 0x48]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_filebuf_char__struct_std::char_traits_char______thiscall_std::basic_filebuf_char__struct_std::char_traits_char__::open_char_const___int_]
test eax, eax
jne 0x402b1d
mov edx, dword [esp + 0x3c]
push ebx
push 2
mov eax, dword [edx + 4]
lea ecx, [esp + eax + 0x44]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov ecx, dword [esp + 0x14]
mov byte [esp + 0xe0], 9
push ecx
push ebp
lea ecx, [esp + 0x44]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___int_]
mov eax, dword [esp + 0x90]
cmp eax, ebx
je 0x402b63
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
test eax, eax
jne 0x402b63
push 2
push ebx
lea ecx, [esp + 0x48]
call dword [sym.imp.MSVCP60.dll_protected:_void___thiscall_std::basic_filebuf_char__struct_std::char_traits_char__::_Init_struct__iobuf___enum_std::basic_filebuf_char__struct_std::char_traits_char__::_Initfl_]
lea edx, [esp + 0x40]
test edx, edx
jne 0x402b77
mov eax, dword [esp + 0x3c]
push ebx
push 2
mov ecx, dword [eax + 4]
lea ecx, [esp + ecx + 0x44]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov eax, dword [esp + 0x3c]
lea edx, [esp + 0x94]
mov dword [esp + 0x14], edx
mov edx, dword [sym.imp.MSVCP60.dll_const_std::basic_ofstream_char__struct_std::char_traits_char__::vftable]
mov ecx, dword [eax + 4]
mov dword [esp + ecx + 0x3c], edx
lea ecx, [esp + 0x40]
mov byte [esp + 0xe0], 0xa
call dword [sym.imp.MSVCP60.dll_public_virtual:_void___thiscall_std::basic_filebuf_char__struct_std::char_traits_char__::destructor_void_]
mov eax, dword [esp + 0x3c]
mov edx, dword [sym.imp.MSVCP60.dll_const_std::basic_ostream_char__struct_std::char_traits_char__::vftable]
mov byte [esp + 0xe0], 4
mov ecx, dword [eax + 4]
mov dword [esp + ecx + 0x3c], edx
lea ecx, [esp + 0x94]
call dword [sym.imp.MSVCP60.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
push 1
lea ecx, [esp + 0x30]
mov byte [esp + 0xe4], 3
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x1c]
mov byte [esp + 0xe4], 2
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0xec]
mov byte [esp + 0xe4], 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [esp + 0xfc]
cmp ecx, ebx
je 0x402c31
mov al, byte [ecx - 1]
cmp al, bl
je 0x402c27
cmp al, 0xff
je 0x402c27
dec al
mov byte [ecx - 1], al
jmp 0x402c31
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x10c]
mov dword [esp + 0xfc], ebx
cmp ecx, ebx
mov dword [esp + 0x100], ebx
mov dword [esp + 0x104], ebx
je 0x402c6d
mov al, byte [ecx - 1]
cmp al, bl
je 0x402c63
cmp al, 0xff
je 0x402c63
dec al
mov byte [ecx - 1], al
jmp 0x402c6d
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov al, 1
mov ecx, dword [esp + 0xd8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xd4
ret