Function at 0x40bd40
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45e7e6
mov eax, dword fs:[0]
push eax
sub esp, 0x208
mov eax, dword [0x46d040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1fc], 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0x1e0], eax
cmp dword [ebp - 0x1e0], 0
jne 0x40bd91
jmp 0x40bf77
push 0xa
push 0x65
mov eax, dword [ebp - 0x1e0]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 0x1e4], eax
cmp dword [ebp - 0x1e4], 0
jne 0x40bdb6
jmp 0x40bf77
mov ecx, dword [ebp - 0x1e4]
push ecx
mov edx, dword [ebp - 0x1e0]
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x1e8], eax
cmp dword [ebp - 0x1e8], 0
jne 0x40bdde
jmp 0x40bf77
mov eax, dword [ebp - 0x1e8]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x1f0], eax
cmp dword [ebp - 0x1f0], 0
jne 0x40bdff
jmp 0x40bf77
mov ecx, dword [ebp - 0x1e4]
push ecx
mov edx, dword [ebp - 0x1e0]
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x1ec], eax
cmp dword [ebp - 0x1ec], 0
jne 0x40be27
jmp 0x40bf77
lea eax, [ebp - 0x114]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
je 0x40be45
jmp 0x40bf77
lea ecx, [ebp - 0x114]
push ecx
lea ecx, [ebp - 0x214]
call fcn.0040f150
mov dword [ebp - 0x1f4], eax
mov edx, dword [ebp - 0x1f4]
mov dword [ebp - 0x1f8], edx
mov dword [ebp - 4], 0
push 0x461384
mov eax, dword [ebp - 0x1f8]
push eax
lea ecx, [ebp - 0x12c]
push ecx
call fcn.00412bf0
add esp, 0xc
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x214]
call fcn.004105a0
nop
push 0xb0
push 0
lea edx, [ebp - 0x1dc]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 1
push 0x40
push 0x20
lea ecx, [ebp - 0x12c]
call fcn.0040ee10
push eax
lea ecx, [ebp - 0x1dc]
call fcn.0040f6f0
mov eax, dword [ebp - 0x1dc]
mov ecx, dword [eax + 4]
mov dword [ebp + ecx - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov edx, dword [ebp - 0x1dc]
mov eax, dword [edx + 4]
sub eax, 0x68
mov ecx, dword [ebp - 0x1dc]
mov edx, dword [ecx + 4]
mov dword [ebp + edx - 0x1e0], eax
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1dc]
mov ecx, dword [eax + 4]
lea ecx, [ebp + ecx - 0x1dc]
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator_bool_void_const]
movzx edx, al
test edx, edx
je 0x40bf48
mov eax, dword [ebp - 0x1ec]
xor ecx, ecx
push ecx
push eax
mov edx, dword [ebp - 0x1f0]
push edx
lea ecx, [ebp - 0x1dc]
call dword [sym.imp.MSVCP140.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___long_long___int64__]
lea ecx, [ebp - 0x1dc]
call fcn.0040c340
nop
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x174]
call fcn.0040c380
lea ecx, [ebp - 0x174]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
nop
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.004105a0
nop
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045caa8
mov esp, ebp
pop ebp
ret