Function at 0x405560
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54891f
mov eax, dword fs:[0]
push eax
sub esp, 0x1cc
mov eax, dword [0x595978]
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
mov esi, ecx
mov dword [ebp - 0x8c], esi
mov dword [ebp - 4], 2
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 8]
mov ecx, edx
cmp eax, 0x10
jae 0x4055ad
lea ecx, [ebp + 8]
add ecx, dword [ebp + 0x18]
cmp eax, 0x10
mov eax, edx
jae 0x4055ba
lea eax, [ebp + 8]
xor edx, edx
mov word [ebp - 0x2c], dx
mov edx, dword [ebp - 0x8c]
push edx
push ecx
push eax
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
call fcn.0041b6c0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x18], 8
mov eax, dword [ebp - 0x2c]
jae 0x4055f0
lea eax, [ebp - 0x2c]
movzx ecx, si
push eax
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
setne bl
call esi
mov dword [ebp - 0x84], eax
test bl, bl
jne 0x405735
lea edx, [ebp - 0x130]
push edx
call fcn.0040a0e0
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x84]
mov edx, dword [ebp - 0x8c]
push eax
push str.._Last_win_error
push 0xc1
push str._at_line
push str._psresident.cpp_
push str._at_file
push str.hRes___0
push str.._Failed_expression_
lea ecx, [ebp - 0x2c]
push ecx
push str.resName
push edx
lea eax, [ebp - 0x130]
push str.FindResource_failed:_resId
push eax
call fcn.00416190
add esp, 8
push eax
call fcn.00409560
push eax
call fcn.00416190
add esp, 8
push eax
call fcn.004169b0
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00409560
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00409730
lea ecx, [ebp - 0x80]
lea eax, [ebp - 0x130]
call fcn.0040a180
mov ecx, eax
lea ebx, [ebp - 0x64]
mov byte [ebp - 4], 5
call fcn.004045b0
mov byte [ebp - 4], 6
cmp dword [eax + 0x14], 0x10
jb 0x405702
mov ecx, dword [eax]
mov dword [ebp - 0x84], ecx
jmp 0x405708
mov dword [ebp - 0x84], eax
lea edx, [ebp - 0x84]
push edx
lea ecx, [ebp - 0x98]
call fcn.0049ce20
push 0x58c098
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0x98], vtable.std::runtime_error.0
call fcn.004a60bb
push edi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
setne byte [ebp - 0x85]
call esi
cmp byte [ebp - 0x85], 0
mov dword [ebp - 0x8c], eax
jne 0x405825
lea ecx, [ebp - 0x130]
push ecx
call fcn.0040a0e0
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x8c]
push edx
push str.._Last_win_error
push 0xc4
push str._at_line
push str._psresident.cpp_
push str._at_file
push str.hResourceLoaded___0
push str.._Failed_expression_
lea eax, [ebp - 0x130]
push str.LoadResource_failed
push eax
call fcn.00416190
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00409560
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00409730
lea ecx, [ebp - 0x64]
lea eax, [ebp - 0x130]
call fcn.0040a180
mov ecx, eax
lea ebx, [ebp - 0x80]
mov byte [ebp - 4], 8
call fcn.004045b0
mov byte [ebp - 4], 9
cmp dword [eax + 0x14], 0x10
jb 0x405702
mov ecx, dword [eax]
mov dword [ebp - 0x84], ecx
jmp 0x405708
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
test eax, eax
mov dword [ebp - 0x84], eax
setne bl
call esi
mov dword [ebp - 0x8c], eax
test bl, bl
jne 0x40590e
lea ecx, [ebp - 0x130]
push ecx
call fcn.0040a0e0
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x8c]
push edx
push str.._Last_win_error
push 0xc7
push str._at_line
push str._psresident.cpp_
push str._at_file
push str.lpResLock___0
push str.._Failed_expression_
lea eax, [ebp - 0x130]
push str.LockResource_failed
push eax
call fcn.00416190
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00409560
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00409730
lea ecx, [ebp - 0x64]
lea eax, [ebp - 0x130]
call fcn.0040a180
mov ecx, eax
lea ebx, [ebp - 0x80]
mov byte [ebp - 4], 0xb
call fcn.004045b0
mov byte [ebp - 4], 0xc
cmp dword [eax + 0x14], 0x10
jb 0x405702
mov ecx, dword [eax]
mov dword [ebp - 0x84], ecx
jmp 0x405708
push edi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
test edi, edi
setne bl
call esi
mov esi, eax
test bl, bl
jne 0x405a0f
lea ecx, [ebp - 0x130]
push ecx
call fcn.0040a0e0
push esi
push str.._Last_win_error
push 0xca
push str._at_line
push str._psresident.cpp_
push str._at_file
push str.dwSizeRes___0
push str.._Failed_expression_
lea edx, [ebp - 0x130]
push str.SizeofResource_failed
push edx
mov byte [ebp - 4], 0xd
call fcn.00416190
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00409560
push eax
call fcn.00415b80
add esp, 8
push eax
call fcn.00409730
lea ecx, [ebp - 0x64]
lea eax, [ebp - 0x130]
call fcn.0040a180
mov ecx, eax
lea ebx, [ebp - 0x80]
mov byte [ebp - 4], 0xe
call fcn.004045b0
mov byte [ebp - 4], 0xf
cmp dword [eax + 0x14], 0x10
jb 0x4059dc
mov eax, dword [eax]
lea ecx, [ebp - 0x84]
push ecx
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x84], eax
call fcn.0049ce20
push 0x58c098
lea edx, [ebp - 0x98]
push edx
mov dword [ebp - 0x98], vtable.std::runtime_error.0
call fcn.004a60bb
lea eax, [ebp + 0x40]
push eax
lea ecx, [ebp + 0x24]
push ecx
lea edx, [ebp - 0x48]
push edx
call fcn.00416d60
add esp, 0xc
mov byte [ebp - 4], 0x10
cmp dword [ebp - 0x34], 0x10
mov eax, dword [ebp - 0x48]
jae 0x405a33
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x1d8]
push eax
call fcn.0040c410
push 0
mov byte [ebp - 4], 0x11
mov ecx, dword [ebp - 0x84]
push edi
push ecx
lea edx, [ebp - 0x1d8]
push edx
call fcn.00409380
lea ecx, [ebp - 0x1d4]
call fcn.0040ec50
test eax, eax
jne 0x405a94
mov eax, dword [ebp - 0x1d8]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + ecx - 0x1cc]
lea ecx, [ebp + ecx - 0x1d8]
or eax, 2
cmp dword [ecx + 0x38], 0
jne 0x405a8c
or eax, 4
push 0
push eax
call fcn.004021e0
lea ecx, [ebp - 0x178]
mov byte [ebp - 4], 0x10
call fcn.0040c570
lea ecx, [ebp - 0x178]
push ecx
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00496b00
add esp, 4
lea ecx, [ebp - 0x48]
call fcn.00408f80
lea ecx, [ebp - 0x2c]
call fcn.00403500
lea ecx, [ebp + 8]
call fcn.00408f80
lea ecx, [ebp + 0x24]
call fcn.00408f80
lea ecx, [ebp + 0x40]
call fcn.00408f80
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.0049cc86
mov esp, ebp
pop ebp
ret