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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x437d9d
mov eax, dword fs:[0]
push eax
sub esp, 0x570
mov eax, dword [0x448080]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x40339d
push 0x10
push str.Error
push str.Failed_to_get_module_file_name.
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4038fc
lea eax, [ebp - 0x420]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
jne 0x4033cb
push 0x10
push str.Error
push str.Failed_to_get_temp_path.
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4038fc
xorps xmm0, xmm0
mov dword [ebp - 0x50c], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x508], 0
movups xmmword [ebp - 0x51c], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4033f2
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x51c]
call fcn.0040a2f0
lea edx, [ebp - 0x51c]
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x450]
call fcn.00402f30
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x508]
cmp ecx, 7
jbe 0x403470
mov edx, dword [ebp - 0x51c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x403466
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403917
push ecx
push edx
call fcn.0041936d
add esp, 8
xor eax, eax
mov dword [ebp - 0x50c], 0
push 4
xorps xmm0, xmm0
mov dword [ebp - 0x508], 7
push 0x4420f4
lea ecx, [ebp - 0x564]
mov word [ebp - 0x51c], ax
movups xmmword [ebp - 0x564], xmm0
mov dword [ebp - 0x554], eax
mov dword [ebp - 0x550], eax
call fcn.0040a2f0
push ecx
lea edx, [ebp - 0x564]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x54c]
call fcn.004029f0
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x420]
xorps xmm0, xmm0
mov dword [ebp - 0x524], 0
movups xmmword [ebp - 0x534], xmm0
mov dword [ebp - 0x520], 0
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x403500
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x534]
call fcn.0040a2f0
lea eax, [ebp - 0x450]
mov byte [ebp - 4], 5
push eax
lea edx, [ebp - 0x534]
lea ecx, [ebp - 0x57c]
call fcn.00409bd0
add esp, 4
lea ecx, [ebp - 0x54c]
mov byte [ebp - 4], 6
push ecx
push eax
push dword [ebp - 0x504]
lea ecx, [ebp - 0x438]
call fcn.0040b900
mov byte [ebp - 4], 8
mov ecx, dword [ebp - 0x568]
cmp ecx, 7
jbe 0x4035a2
mov edx, dword [ebp - 0x57c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x403598
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40391c
push ecx
push edx
call fcn.0041936d
add esp, 8
xor eax, eax
mov dword [ebp - 0x56c], 0
mov dword [ebp - 0x568], 7
mov word [ebp - 0x57c], ax
mov byte [ebp - 4], 9
mov ecx, dword [ebp - 0x520]
cmp ecx, 7
jbe 0x403603
mov edx, dword [ebp - 0x534]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4035f9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40391c
push ecx
push edx
call fcn.0041936d
add esp, 8
xor eax, eax
mov dword [ebp - 0x524], 0
mov dword [ebp - 0x520], 7
mov word [ebp - 0x534], ax
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x538]
cmp ecx, 7
jbe 0x403664
mov edx, dword [ebp - 0x54c]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40365a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40391c
push ecx
push edx
call fcn.0041936d
add esp, 8
xor eax, eax
mov dword [ebp - 0x53c], 0
mov dword [ebp - 0x538], 7
mov word [ebp - 0x54c], ax
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0x550]
cmp ecx, 7
jbe 0x4036c5
mov edx, dword [ebp - 0x564]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4036bb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40391c
push ecx
push edx
call fcn.0041936d
add esp, 8
push 0x44201c
push 0x66
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x40384f
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40384f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
je 0x40384f
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x40384f
push 0xb0
lea eax, [ebp - 0x500]
push 0
push eax
call fcn.0041af90
cmp dword [ebp - 0x424], 7
lea eax, [ebp - 0x438]
lea ecx, [ebp - 0x500]
cmova eax, dword [ebp - 0x438]
push eax
call fcn.00408640
mov eax, dword [ebp - 0x500]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x500]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x504], eax
push 0
push esi
push edi
lea ecx, [ebp - 0x500]
mov byte [ebp - 4], 0xc
call fcn.00406e00
lea ecx, [ebp - 0x4fc]
call fcn.00408560
test eax, eax
jne 0x4037b8
mov eax, dword [ebp - 0x500]
lea ecx, [ebp - 0x500]
push 0
add ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + 0x38], eax
sete al
lea eax, [eax*4 + 2]
or eax, dword [ecx + 0xc]
push eax
call fcn.004027f0
mov eax, dword [ebp - 0x500]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x500]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x504], eax
lea ecx, [ebp - 0x4fc]
call fcn.00406a90
mov eax, dword [ebp - 0x500]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ostream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x500]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x504], eax
lea eax, [ebp - 0x498]
mov byte [ebp - 4], 0xd
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.00418673
add esp, 4
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x438]
call fcn.00403120
test al, al
jne 0x403863
push 0x10
push str.Error
push str.Failed_to_open_PDF_file.
jmp 0x40385b
push 0x10
push str.Error
push str.Failed_to_extract_PDF_resource.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 0x424]
cmp ecx, 7
jbe 0x4038a3
mov edx, dword [ebp - 0x438]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x403899
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403921
push ecx
push edx
call fcn.0041936d
add esp, 8
mov ecx, dword [ebp - 0x43c]
xor eax, eax
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 7
mov word [ebp - 0x438], ax
cmp ecx, 7
jbe 0x4038fc
mov edx, dword [ebp - 0x450]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4038f2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403921
push ecx
push edx
call fcn.0041936d
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00419325
mov esp, ebp
pop ebp
ret
call fcn.00421825
call fcn.00421825
call fcn.00421825
int3