Function at 0x40f6e0
Capabilities:
Check if file exists
Delete file
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5091f9
mov eax, dword fs:[0]
push eax
sub esp, 0x5b4
mov eax, dword [0x5490a4]
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 edi, ecx
mov dword [ebp - 0x5a8], edi
cmp dword [0x54bb00], 0
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
jne 0x40f72a
call fcn.00408ec0
mov ecx, dword [0x54bb00]
call fcn.0047dee6
mov edx, eax
mov dword [ebp - 0x380], 7
xor eax, eax
mov dword [ebp - 0x384], 0
mov word [ebp - 0x394], ax
cmp word [edx], ax
jne 0x40f75d
xor ecx, ecx
jmp 0x40f777
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f762
sub ecx, edi
mov edi, dword [ebp - 0x5a8]
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x394]
call fcn.00403840
xor eax, eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x350], 7
mov dword [ebp - 0x354], 0
mov word [ebp - 0x364], ax
cmp word [ebx], ax
jne 0x40f7b1
xor ecx, ecx
jmp 0x40f7c5
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f7b6
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x364]
call fcn.00403840
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00410310
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0048d530
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x218]
push eax
call fcn.0048362e
add esp, 4
mov dword [ebp - 0x338], 7
xor eax, eax
mov dword [ebp - 0x33c], 0
lea ecx, [ebp - 0x34c]
mov word [ebp - 0x34c], ax
push 1
push 0x50f96c
call fcn.00403840
push 0xd
push 0x510d44
lea ecx, [ebp - 0x34c]
mov byte [ebp - 4], 2
call fcn.004033c0
push 1
push 0x50f96c
lea ecx, [ebp - 0x34c]
call fcn.004033c0
push 1
xor eax, eax
mov dword [ebp - 0x320], 7
push 0x50f96c
lea ecx, [ebp - 0x334]
mov dword [ebp - 0x324], 0
mov word [ebp - 0x334], ax
call fcn.00403840
push 0xd
push str.aa0e3b99ef85e
lea ecx, [ebp - 0x334]
mov byte [ebp - 4], 3
call fcn.004033c0
push 1
push 0x50f96c
lea ecx, [ebp - 0x334]
call fcn.004033c0
cmp dword [ebp - 0x320], 8
lea ecx, [ebp - 0x334]
lea eax, [ebp - 0x34c]
cmovae ecx, dword [ebp - 0x334]
cmp dword [ebp - 0x338], 8
push ecx
cmovae eax, dword [ebp - 0x34c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x4101ba
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push esi
mov dword [ebp - 0x5bc], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0x1869f
push 0x2710
mov dword [ebp - 0x5a8], eax
call fcn.00484f7a
cdq
push edx
push eax
lea eax, [ebp - 0x3f4]
push eax
call fcn.00484eed
add esp, 0x14
lea edi, [ebp - 0x218]
mov byte [ebp - 4], 4
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40f950
mov ecx, 6
mov esi, str.XiangCaoWifi
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea edi, [ebp - 0x218]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40f973
cmp dword [ebp - 0x3e0], 8
lea edx, [ebp - 0x3f4]
mov eax, dword [0x510d7c]
cmovae edx, dword [ebp - 0x3f4]
mov dword [edi], eax
mov esi, edx
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40f9a0
lea edi, [ebp - 0x218]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40f9b6
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x218]
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40f9e0
mov eax, dword [0x510d80]
mov dword [ecx], eax
mov eax, dword [0x510d84]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40fa1b
lea eax, [ebp - 0x218]
push eax
call fcn.00484b14
add esp, 4
push 0
push 0x80
push 1
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40fa6e
push 0
lea eax, [ebp - 0x5c0]
mov dword [ebp - 0x5c0], 0
push eax
push dword [ebp - 0x5a8]
push dword [ebp - 0x5bc]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x104
lea eax, [ebp - 0x31c]
push 0
push eax
call fcn.0048d530
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0047d96d
add esp, 0x14
cmp dword [0x54bb00], 0
jne 0x40faa5
call fcn.00408ec0
mov ecx, dword [0x54bb00]
call fcn.004060e0
cmp dword [0x54bb00], 0
jne 0x40fabe
call fcn.00408ec0
mov ecx, dword [0x54bb00]
call fcn.004044b0
cmp dword [ebp - 0x350], 8
lea ecx, [ebp - 0x5b8]
push ecx
push fcn.004102b0
lea ecx, [ebp - 0x31c]
mov dword [ebp - 0x5b8], 0
lea eax, [ebp - 0x364]
cmovae eax, dword [ebp - 0x364]
push ecx
push eax
call fcn.0048526a
add esp, 0x10
mov dword [ebp - 0x3c8], 7
xor eax, eax
mov dword [ebp - 0x3cc], 0
lea ecx, [ebp - 0x3dc]
mov word [ebp - 0x3dc], ax
push eax
push 0x50f7a0
call fcn.00403840
xor eax, eax
mov byte [ebp - 4], 5
push eax
push 0x50f7a0
lea ecx, [ebp - 0x37c]
mov dword [ebp - 0x368], 7
mov dword [ebp - 0x36c], 0
mov word [ebp - 0x37c], ax
call fcn.00403840
push ebx
lea ecx, [ebp - 0x3ac]
mov byte [ebp - 4], 6
call fcn.00401d80
push 9
push str.Psych.exe
lea ecx, [ebp - 0x3ac]
mov byte [ebp - 4], 7
call fcn.004033c0
cmp dword [0x54bb00], 0
jne 0x40fb97
call fcn.00408ec0
mov ecx, dword [0x54bb00]
call fcn.004050e0
cmp dword [0x54bb00], 0
mov dword [ebp - 0x5a8], eax
jne 0x40fbb6
call fcn.00408ec0
mov ecx, dword [0x54bb00]
call fcn.004050c0
mov edi, eax
lea ecx, [ebp - 0x58c]
push edi
call fcn.00401d80
push 2
push 0
push 0x510d88
lea ecx, [ebp - 0x58c]
mov byte [ebp - 4], 8
call fcn.00406ec0
cmp dword [0x54bb00], 0
mov dword [ebp - 0x5bc], eax
jne 0x40fbfb
call fcn.00408ec0
mov ecx, dword [0x54bb00]
call fcn.00405060
test eax, eax
mov esi, 1
mov ebx, 0
cmovne ebx, esi
cmp dword [0x54bb00], 0
jne 0x40fc23
call fcn.00408ec0
mov ecx, dword [0x54bb00]
call fcn.00405030
neg eax
mov dword [ebp - 0x5b4], 0
mov dword [ebp - 0x5b0], 0
sbb eax, eax
mov dword [ebp - 0x5ac], 0
neg eax
cmp dword [ebp + 0xc], 0
cmove esi, eax
mov ecx, dword [ebp - 0x5a8]
mov byte [ebp - 4], 9
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40fc66
sub ecx, edx
sar ecx, 1
je 0x40fd9c
push str.19df
lea ecx, [ebp - 0x40c]
call fcn.00401d80
lea eax, [ebp - 0x40c]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
mov eax, dword [ebp - 0x3f8]
mov byte [ebp - 4], 9
cmp eax, 8
jb 0x40fcc3
inc eax
lea ecx, [ebp - 0x40c]
push eax
push dword [ebp - 0x40c]
call fcn.00467f00
push dword [ebp - 0x5a8]
lea ecx, [ebp - 0x424]
call fcn.00401d80
lea eax, [ebp - 0x424]
mov byte [ebp - 4], 0xb
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
mov eax, dword [ebp - 0x410]
mov byte [ebp - 4], 9
cmp eax, 8
jb 0x40fd0c
inc eax
lea ecx, [ebp - 0x424]
push eax
push dword [ebp - 0x424]
call fcn.00467f00
push str.7d02
lea ecx, [ebp - 0x43c]
call fcn.00401d80
lea eax, [ebp - 0x43c]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
mov eax, dword [ebp - 0x428]
mov byte [ebp - 4], 9
cmp eax, 8
jb 0x40fd54
inc eax
lea ecx, [ebp - 0x43c]
push eax
push dword [ebp - 0x43c]
call fcn.00467f00
push edi
lea ecx, [ebp - 0x454]
call fcn.00401d80
lea eax, [ebp - 0x454]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
mov eax, dword [ebp - 0x440]
mov byte [ebp - 4], 9
cmp eax, 8
jb 0x40fe28
inc eax
lea ecx, [ebp - 0x454]
push eax
push dword [ebp - 0x454]
jmp 0x40fe23
push str.7d02
lea ecx, [ebp - 0x46c]
call fcn.00401d80
lea eax, [ebp - 0x46c]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
mov eax, dword [ebp - 0x458]
mov byte [ebp - 4], 9
cmp eax, 8
jb 0x40fde4
inc eax
lea ecx, [ebp - 0x46c]
push eax
push dword [ebp - 0x46c]
call fcn.00467f00
push edi
lea ecx, [ebp - 0x484]
call fcn.00401d80
lea eax, [ebp - 0x484]
mov byte [ebp - 4], 0xf
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
mov eax, dword [ebp - 0x470]
mov byte [ebp - 4], 9
cmp eax, 8
jb 0x40fe28
inc eax
lea ecx, [ebp - 0x484]
push eax
push dword [ebp - 0x484]
call fcn.00467f00
cmp dword [ebp - 0x5bc], 0xffffffff
je 0x40feb2
push str.cf12
lea ecx, [ebp - 0x3c4]
call fcn.00401d80
lea eax, [ebp - 0x3c4]
mov byte [ebp - 4], 0x10
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
mov eax, dword [ebp - 0x3b0]
mov byte [ebp - 4], 9
cmp eax, 8
jb 0x40fe7d
inc eax
lea ecx, [ebp - 0x3c4]
push eax
push dword [ebp - 0x3c4]
call fcn.00467f00
push 0x510db4
lea ecx, [ebp - 0x4b4]
call fcn.00401d80
lea eax, [ebp - 0x4b4]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
lea ecx, [ebp - 0x4b4]
mov byte [ebp - 4], 9
call fcn.004022f0
test esi, esi
jne 0x40ff20
push str.a981
lea ecx, [ebp - 0x4cc]
call fcn.00401d80
lea eax, [ebp - 0x4cc]
mov byte [ebp - 4], 0x12
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
lea ecx, [ebp - 0x4cc]
mov byte [ebp - 4], 9
call fcn.004022f0
push 0x51088c
lea ecx, [ebp - 0x4e4]
call fcn.00401d80
lea eax, [ebp - 0x4e4]
mov byte [ebp - 4], 0x13
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 9
call fcn.004022f0
test ebx, ebx
jne 0x40ff8e
push str.d856
lea ecx, [ebp - 0x4fc]
call fcn.00401d80
lea eax, [ebp - 0x4fc]
mov byte [ebp - 4], 0x14
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
lea ecx, [ebp - 0x4fc]
mov byte [ebp - 4], 9
call fcn.004022f0
push 0x51088c
lea ecx, [ebp - 0x514]
call fcn.00401d80
lea eax, [ebp - 0x514]
mov byte [ebp - 4], 0x15
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 9
call fcn.004022f0
cmp dword [ebp + 0xc], 0
jne 0x40fffe
push str.ef56
lea ecx, [ebp - 0x52c]
call fcn.00401d80
lea eax, [ebp - 0x52c]
mov byte [ebp - 4], 0x16
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
lea ecx, [ebp - 0x52c]
mov byte [ebp - 4], 9
call fcn.004022f0
push 0x51088c
lea ecx, [ebp - 0x544]
call fcn.00401d80
lea eax, [ebp - 0x544]
mov byte [ebp - 4], 0x17
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
lea ecx, [ebp - 0x544]
mov byte [ebp - 4], 9
call fcn.004022f0
cmp dword [0x54bb00], 0
jne 0x41000c
call fcn.00408ec0
mov ecx, dword [0x54bb00]
lea eax, [ebp - 0x49c]
push eax
call fcn.00405080
cmp dword [ebp - 0x48c], 0
mov byte [ebp - 4], 0x18
je 0x410072
push str.bec5
lea ecx, [ebp - 0x55c]
call fcn.00401d80
lea eax, [ebp - 0x55c]
mov byte [ebp - 4], 0x19
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403c30
lea ecx, [ebp - 0x55c]
mov byte [ebp - 4], 0x18
call fcn.004022f0
lea eax, [ebp - 0x49c]
push eax
lea ecx, [ebp - 0x5b4]
call fcn.00403b40
push 0x510df0
lea ecx, [ebp - 0x574]
call fcn.00401d80
lea eax, [ebp - 0x5b4]
mov byte [ebp - 4], 0x1a
push eax
lea eax, [ebp - 0x574]
push eax
lea eax, [ebp - 0x5a4]
push eax
call fcn.0047d4fa
add esp, 0xc
lea ecx, [ebp - 0x37c]
push eax
call fcn.00402620
lea ecx, [ebp - 0x5a4]
call fcn.004022f0
lea ecx, [ebp - 0x574]
mov byte [ebp - 4], 0x18
call fcn.004022f0
cmp dword [ebp - 0x368], 8
lea ecx, [ebp - 0x37c]
push 0x2710
cmovae ecx, dword [ebp - 0x37c]
lea eax, [ebp - 0x3ac]
cmp dword [ebp - 0x398], 8
push 1
cmovae eax, dword [ebp - 0x3ac]
push ecx
push eax
call fcn.0047c4aa
mov esi, dword [ebp - 0x5b8]
mov edi, 0x64
mov ecx, edi
mov eax, 0x55555556
sub ecx, esi
imul ecx
push edi
mov eax, edx
shr eax, 0x1f
add eax, edx
add esi, eax
push esi
mov dword [ebp - 0x5b8], esi
call fcn.004102b0
mov ecx, dword [ebp - 0x5b8]
mov eax, 0x55555556
sub edi, ecx
imul edi
push 0x64
mov eax, edx
shr eax, 0x1f
add eax, edx
add ecx, eax
push ecx
mov dword [ebp - 0x5b8], ecx
call fcn.004102b0
add esp, 0x20
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x64
push 0x64
call fcn.004102b0
add esp, 8
lea ecx, [ebp - 0x49c]
call fcn.004022f0
lea ecx, [ebp - 0x5b4]
call fcn.00402330
lea ecx, [ebp - 0x58c]
call fcn.004022f0
lea ecx, [ebp - 0x3ac]
call fcn.004022f0
lea ecx, [ebp - 0x37c]
call fcn.004022f0
lea ecx, [ebp - 0x3dc]
call fcn.004022f0
lea ecx, [ebp - 0x3f4]
call fcn.004022f0
mov eax, dword [ebp - 0x320]
cmp eax, 8
jb 0x4101d8
inc eax
lea ecx, [ebp - 0x334]
push eax
push dword [ebp - 0x334]
call fcn.00467f00
xor eax, eax
mov dword [ebp - 0x320], 7
mov word [ebp - 0x334], ax
mov eax, dword [ebp - 0x338]
mov dword [ebp - 0x324], 0
cmp eax, 8
jb 0x410213
inc eax
lea ecx, [ebp - 0x34c]
push eax
push dword [ebp - 0x34c]
call fcn.00467f00
xor eax, eax
mov dword [ebp - 0x338], 7
mov word [ebp - 0x34c], ax
mov eax, dword [ebp - 0x350]
mov dword [ebp - 0x33c], 0
cmp eax, 8
jb 0x41024e
inc eax
lea ecx, [ebp - 0x364]
push eax
push dword [ebp - 0x364]
call fcn.00467f00
xor eax, eax
mov dword [ebp - 0x350], 7
mov word [ebp - 0x364], ax
mov eax, dword [ebp - 0x380]
mov dword [ebp - 0x354], 0
cmp eax, 8
jb 0x410289
inc eax
lea ecx, [ebp - 0x394]
push eax
push dword [ebp - 0x394]
call fcn.00467f00
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.00413c46
mov esp, ebp
pop ebp
ret 0xc