Function at 0x40cfa0
Capabilities:
Check if file exists
Extract resource via kernel32 functions

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x421407
push eax
mov dword fs:[0], esp
sub esp, 0x480
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
push esi
push edi
mov ecx, dword [ebp + 0x454]
cmp ecx, ebx
je 0x40cfd9
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [ebp + 0x454], ebx
mov eax, dword [ebp + 0x30]
cmp eax, 3
ja case.default.0x40cfe5
jmp dword [eax*4 + 0x40d600]
cmp dword [ebp + 0x34], ebx
je case.default.0x40cfe5
push 0x228
call fcn.004180fc
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
cmp esi, ebx
mov dword [esp + 0x498], ebx
je 0x40d0e0
mov ecx, dword [ebp + 0x38]
mov edx, dword [ebp + 0x34]
cmp ebp, ebx
mov dword [esp + 0x14], ecx
je 0x40d02a
mov eax, dword [ebp + 4]
jmp 0x40d02c
xor eax, eax
and edx, 0xffff
push 0x4291d4
mov dword [esi + 4], eax
push edx
mov edx, dword [esp + 0x1c]
mov ecx, 0x82
xor eax, eax
lea edi, [esi + 0xc]
mov dword [esi + 8], ebx
mov dword [esi + 0x214], 1
mov dword [esi + 0x218], ebp
mov dword [esi + 0x21c], ebx
mov dword [esi + 0x220], ebx
mov dword [esi + 0x224], ebx
mov dword [esi], 0x422644
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, ebx
je 0x40d0e2
mov eax, dword [esp + 0x14]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x40d0e2
mov ecx, dword [esp + 0x14]
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
cmp eax, ebx
mov dword [esp + 0x14], eax
je 0x40d0e2
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
mov dword [esp + 0x18], eax
je 0x40d0e2
lea edi, [esi + 8]
push edi
call sub.MxTool.dll_CreateMxZipObj
mov eax, dword [edi]
cmp eax, ebx
je 0x40d0e2
mov edx, dword [esp + 0x14]
mov ecx, dword [eax]
push ebx
push edx
mov edx, dword [esp + 0x20]
push edx
push eax
call dword [ecx + 0x2c]
jmp 0x40d0e2
xor esi, esi
lea edi, [ebp + 0x24c]
mov dword [esp + 0x498], 0xffffffff
cmp edi, ebx
mov dword [ebp + 0x454], esi
je case.default.0x40cfe5
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je case.default.0x40cfe5
cmp dword [esi + 0x214], 3
jne 0x40d12a
mov eax, dword [esi + 4]
push edi
push eax
mov ecx, esi
call fcn.004106e0
jmp case.default.0x40cfe5
mov cl, byte [esp + 0x12]
push ebx
mov byte [esp + 0x24], cl
lea ecx, [esp + 0x24]
call fcn.0040cf30
push edi
call fcn.00417a8e
add esp, 4
lea ecx, [esp + 0x20]
push eax
push edi
call fcn.0040cb90
lea edx, [esp + 0x12]
lea ecx, [esp + 0x60]
push edx
push 0x4291d0
mov dword [esp + 0x4a0], 1
call fcn.0040a090
mov edi, eax
lea eax, [esp + 0x13]
lea ecx, [esp + 0x70]
push eax
push 0x4274f0
mov byte [esp + 0x4a0], 2
call fcn.0040a090
push edi
lea ecx, [esp + 0x24]
push eax
push ecx
mov byte [esp + 0x4a4], 3
call fcn.00411590
add esp, 0xc
lea ecx, [esp + 0x70]
push 1
call fcn.0040cf30
push 1
lea ecx, [esp + 0x64]
mov byte [esp + 0x49c], 1
call fcn.0040cf30
lea edx, [esp + 0x20]
mov ecx, esi
push edx
push 0x42c54c
call fcn.004109a0
mov eax, dword [esp + 0x24]
mov dword [esp + 0x14], ebx
cmp eax, ebx
mov dword [esp + 0x18], ebx
jne 0x40d1e6
mov eax, 0x422470
lea ecx, [esp + 0x18]
lea edx, [esp + 0x14]
push ecx
push edx
push eax
mov ecx, esi
call fcn.00410050
test al, al
jne 0x40d20c
push 1
lea ecx, [esp + 0x24]
call fcn.0040cf30
jmp case.default.0x40cfe5
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x13]
shr ecx, 1
push eax
push ecx
push edx
lea ecx, [esp + 0x5c]
call fcn.0040d630
lea eax, [esp + 0x12]
lea ecx, [esp + 0x30]
push eax
push 0x42c54c
mov byte [esp + 0x4a0], 4
call fcn.0040a090
mov ecx, dword [esi + 0x218]
mov byte [esp + 0x498], 5
cmp ecx, ebx
je 0x40d266
mov edx, dword [ecx]
lea eax, [esp + 0x30]
push eax
lea eax, [esp + 0x54]
push eax
call dword [edx + 0xc]
test al, al
jne 0x40d27c
mov ecx, dword [0x422604]
lea edx, [esp + 0x50]
push ecx
push ebx
push edx
lea ecx, [esp + 0x3c]
call fcn.0040c980
lea eax, [esp + 0x13]
lea ecx, [esp + 0x40]
push eax
call fcn.0040d610
mov eax, dword [0x422604]
push 1
lea ecx, [esp + 0x20]
push eax
push ecx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x4a4], 6
mov dword [esp + 0x28], 0x2f
call fcn.0040cc40
cmp eax, dword [0x422604]
je 0x40d303
mov ecx, dword [esp + 0x24]
cmp ecx, ebx
jne 0x40d2c5
mov ecx, 0x422470
lea edx, [esp + 0x12]
inc eax
push edx
push eax
push ecx
lea ecx, [esp + 0x6c]
call fcn.0040d630
mov ecx, dword [0x422604]
mov byte [esp + 0x498], 7
push ecx
push ebx
push eax
lea ecx, [esp + 0x4c]
call fcn.0040c980
push 1
lea ecx, [esp + 0x64]
mov byte [esp + 0x49c], 6
call fcn.0040cf30
lea edx, [esp + 0x40]
mov ecx, esi
push edx
push str.zzz:__
call fcn.004109a0
mov ecx, dword [esp + 0x44]
cmp ecx, ebx
jne 0x40d321
mov ecx, 0x422470
mov eax, dword [esp + 0x34]
cmp eax, ebx
jne 0x40d32e
mov eax, 0x422470
push ecx
mov ecx, dword [esp + 0x3c]
lea edx, [ecx + ecx]
push edx
push eax
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.MxUI.dll_HTMLayoutLoadHtmlEx]
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0041749e
add esp, 4
lea ecx, [esp + 0x40]
push 1
call fcn.0040cf30
push 1
lea ecx, [esp + 0x34]
call fcn.0040cf30
push 1
lea ecx, [esp + 0x54]
call fcn.0040cf30
push 1
lea ecx, [esp + 0x24]
call fcn.0040cf30
jmp case.default.0x40cfe5
lea esi, [ebp + 0x3c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je case.default.0x40cfe5
push 0x228
call fcn.004180fc
add esp, 4
mov dword [esp + 0x1c], eax
cmp eax, ebx
mov dword [esp + 0x498], 8
je 0x40d3bf
push ebp
push 1
push esi
mov ecx, eax
call fcn.0040f140
jmp 0x40d3c1
xor eax, eax
mov dword [ebp + 0x454], eax
add ebp, 0x24c
mov dword [esp + 0x498], 0xffffffff
push ebp
mov ecx, eax
jmp 0x40d5e2
cmp dword [ebp + 0x244], ebx
je case.default.0x40cfe5
push 0x228
call fcn.004180fc
mov esi, eax
add esp, 4
mov dword [esp + 0x14], esi
cmp esi, ebx
mov dword [esp + 0x498], 9
je 0x40d48b
mov edx, dword [ebp + 0x248]
mov eax, dword [ebp + 0x244]
cmp ebp, ebx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], eax
je 0x40d42b
mov eax, dword [ebp + 4]
jmp 0x40d42d
xor eax, eax
lea edx, [esi + 8]
mov dword [esi + 4], eax
mov ecx, 0x82
xor eax, eax
lea edi, [esi + 0xc]
mov dword [edx], ebx
mov dword [esi + 0x214], 2
mov dword [esi + 0x218], ebp
mov dword [esi + 0x21c], ebx
mov dword [esi + 0x220], ebx
mov dword [esi + 0x224], ebx
mov dword [esi], 0x422644
rep stosd dword es:[edi], eax
push edx
call sub.MxTool.dll_CreateMxZipObj
mov eax, dword [esi + 8]
cmp eax, ebx
je 0x40d487
mov edx, dword [esp + 0x1c]
mov ecx, dword [eax]
push ebx
push edx
mov edx, dword [esp + 0x20]
push edx
push eax
call dword [ecx + 0x2c]
mov ecx, esi
jmp 0x40d48d
xor ecx, ecx
mov dword [ebp + 0x454], ecx
add ebp, 0x24c
mov dword [esp + 0x498], 0xffffffff
push ebp
jmp 0x40d5e2
lea esi, [ebp + 0x24c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je case.default.0x40cfe5
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x82]
mov word [esp + 0x80], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x28a]
mov word [esp + 0x288], bx
rep stosd dword es:[edi], eax
push 0x5c
push esi
stosw word es:[edi], ax
call fcn.00418217
mov edi, eax
add esp, 8
cmp edi, ebx
je 0x40d533
sub eax, ebp
lea ecx, [esp + 0x80]
sub eax, 0x24c
sar eax, 1
inc eax
push eax
push esi
push ecx
call fcn.0041828f
add edi, 2
lea edx, [esp + 0x294]
push edi
push edx
call fcn.00417ec8
add esp, 0x14
jmp 0x40d544
lea eax, [esp + 0x288]
push esi
push eax
call fcn.00417ec8
add esp, 8
push 0x228
call fcn.004180fc
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40d5d2
cmp ebp, ebx
je 0x40d560
mov eax, dword [ebp + 4]
jmp 0x40d562
xor eax, eax
mov dword [esi + 8], ebx
mov dword [esi + 0x21c], ebx
mov dword [esi + 0x220], ebx
mov dword [esi + 0x224], ebx
lea ebx, [esi + 0xc]
mov dword [esi + 4], eax
mov ecx, 0x82
xor eax, eax
mov edi, ebx
mov dword [esi + 0x214], 3
mov dword [esi + 0x218], ebp
mov dword [esi], 0x422644
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x80]
test ecx, ecx
je 0x40d5ce
lea edx, [esp + 0x80]
push edx
call fcn.00417a8e
add esp, 4
test eax, eax
je 0x40d5ce
lea eax, [esp + 0x80]
push eax
push ebx
call fcn.00417ec8
add esp, 8
mov ecx, esi
jmp 0x40d5d4
xor ecx, ecx
lea edx, [esp + 0x288]
mov dword [ebp + 0x454], ecx
push edx
call fcn.0040f440
mov ecx, dword [esp + 0x490]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x48c
ret