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

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x4c84ab
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x517774]
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x18], edi
push str.InsertTextIntoTempHtmlFile__
push 2
push 0x519518
mov dword [ebp - 4], 0
call fcn.00402450
mov eax, dword [edi + 0x154]
lea esi, [edi + 0x154]
sub eax, 0x10
push eax
call fcn.004018e0
lea ecx, [eax + 0x10]
add esp, 0x10
mov dword [ebp - 0x14], ecx
mov eax, dword [ecx - 0xc]
xor edx, edx
test eax, eax
setne dl
mov byte [ebp - 4], 1
mov eax, edx
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x40ee3e
mov eax, dword [ebp + 0x218]
test eax, eax
je 0x40ee1c
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
movzx eax, ax
push 0x17
push eax
push edx
call edi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x40edd8
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40edd8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x40edd8
push esi
push 0
call edi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
lea edi, [esi + 1]
push edi
call fcn.0044630a
mov ecx, dword [ebp - 0x20]
push esi
push ecx
mov ebx, eax
push edi
push ebx
call fcn.004976fa
add esp, 0x14
test eax, eax
jne 0x40edc8
push ebx
lea ecx, [ebp - 0x14]
call fcn.00402300
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x14]
push edx
add ecx, 0x154
mov esi, 1
call fcn.00401f10
jmp 0x40edcb
mov esi, dword [ebp - 0x1c]
push ebx
call fcn.00446315
add esp, 4
test esi, esi
jne 0x40ee38
push str.web_control_source_is_not_loaded
push 0x400
push 0x519518
call fcn.00402450
push str.InsertTextIntoTempHtmlFile___returning_FALSE
push 4
push 0x519518
call fcn.00402450
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
add esp, 0x18
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x40f161
lea eax, [ebp - 0x14]
push eax
mov ecx, edi
call fcn.00466214
test eax, eax
je 0x40edd8
lea ecx, [ebp - 0x14]
push ecx
mov ecx, esi
call fcn.00401f10
jmp 0x40ee3b
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
cmp dword [ecx - 0xc], 0
jl 0x40f136
push str._body
push ecx
call fcn.0049858b
mov ecx, dword [ebp - 0x14]
add esp, 8
test eax, eax
je 0x40eec6
sub eax, ecx
cmp eax, 0xffffffff
je 0x40eec6
mov edx, dword [ecx - 0xc]
test eax, eax
jl 0x40eec6
cmp eax, edx
jg 0x40eec6
add eax, ecx
push 0x4d6514
push eax
call fcn.0049858b
mov ecx, dword [ebp - 0x14]
add esp, 8
test eax, eax
je 0x40eec6
sub eax, ecx
mov esi, eax
cmp esi, 0xffffffff
je 0x40eec6
cmp dword [ecx - 0xc], 0
jl 0x40f136
push str.__body_
push ecx
call fcn.0049858b
mov ecx, dword [ebp - 0x14]
add esp, 8
test eax, eax
je 0x40eec6
sub eax, ecx
cmp eax, 0xffffffff
je 0x40eec6
sub eax, esi
dec eax
push eax
inc esi
push esi
lea ecx, [ebp - 0x14]
call fcn.0040d6c0
mov ecx, dword [ebp - 0x14]
cmp dword [ecx - 0xc], 0
jl 0x40f136
push str.__body_
push ecx
call fcn.0049858b
add esp, 8
test eax, eax
je 0x40f136
sub eax, dword [ebp - 0x14]
cmp eax, 0xffffffff
je 0x40f136
mov ecx, dword [ebp + 0x214]
push ecx
push eax
lea ecx, [ebp - 0x14]
call fcn.0040e100
mov edx, dword [ebp - 0x14]
push edx
push str.source_html:_n_s_n
push 0x20
push 0x519518
call fcn.00402450
mov eax, dword [edi + 0x150]
lea esi, [edi + 0x150]
push eax
call fcn.0040b500
add esp, 0x14
test eax, eax
jne 0x40ef94
push 0x103
push eax
mov byte [ebp + 0x104], al
lea eax, [ebp + 0x105]
push eax
call fcn.00497680
push 0x103
lea ecx, [ebp + 1]
push 0
push ecx
mov byte [ebp], 0
call fcn.00497680
add esp, 0x18
lea edx, [ebp]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp + 0x104]
push eax
push 0
push 0x4d64f4
lea ecx, [ebp]
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea edx, [ebp + 0x104]
push edx
mov ecx, esi
call fcn.00402300
lea ecx, [ebp - 0x34]
call fcn.0046c609
mov esi, dword [esi]
push 0
push 0x1001
push esi
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 2
call fcn.0046c66b
test eax, eax
je 0x40f054
mov eax, dword [ebp - 0x14]
push eax
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 3
call fcn.0046c868
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 2
call fcn.0046ca25
jmp 0x40f06b
push str.Creation_opening_of_temp_file_failed
push 0x400
push 0x519518
call fcn.00402450
add esp, 0xc
mov ecx, dword [edi + 0x150]
push ecx
push str._tempHtmlFile:__s
push 0x20
push 0x519518
call fcn.00402450
mov eax, dword [edi + 0x150]
push eax
call fcn.0040b500
add esp, 0x14
test eax, eax
je 0x40f12a
mov eax, dword [edi + 0x150]
mov edx, dword [edi]
push 0
push 0
push 0
push 0
push 0
push eax
mov eax, dword [edx + 0x22c]
mov ecx, edi
call eax
push str.InsertTextIntoTempHtmlFile___returning_TRUE
push 4
push 0x519518
call fcn.00402450
add esp, 0xc
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call fcn.0046caa1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f0fa
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x214]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f123
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x40f194
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 1
call fcn.0046caa1
push str.InsertTextIntoTempHtmlFile___returning_FALSE
push 4
push 0x519518
call fcn.00402450
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
add esp, 0xc
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f16d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x214]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f192
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.004974ba
add ebp, 0x20c
mov esp, ebp
pop ebp
ret 8