Function at 0x40e750
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 0x513b8f
mov eax, dword fs:[0]
push eax
sub esp, 0x5e8
mov eax, dword [0x55509c]
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 dword [ebp - 0x5e4], ecx
cmp dword [0x557b08], 0
mov edi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
jne 0x40e798
call fcn.00407d30
mov ecx, dword [0x557b08]
call fcn.00414609
mov edx, eax
mov dword [ebp - 0x398], 7
xor eax, eax
mov dword [ebp - 0x39c], 0
mov word [ebp - 0x3ac], ax
cmp word [edx], ax
jne 0x40e7cb
xor ecx, ecx
jmp 0x40e7df
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e7d0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x3ac]
call fcn.00402180
xor eax, eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x380], 7
mov dword [ebp - 0x384], 0
mov word [ebp - 0x394], ax
cmp word [ebx], ax
jne 0x40e819
xor ecx, ecx
jmp 0x40e82f
mov ecx, ebx
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40e820
sub ecx, edx
sar ecx, 1
push ecx
push ebx
lea ecx, [ebp - 0x394]
call fcn.00402180
xor eax, eax
mov byte [ebp - 4], 1
push 0xffffffffffffffff
push eax
mov word [ebp - 0x37c], ax
lea ecx, [ebp - 0x37c]
lea eax, [ebp - 0x3ac]
mov dword [ebp - 0x368], 7
push eax
mov dword [ebp - 0x36c], 0
call fcn.00402060
xor eax, eax
mov byte [ebp - 4], 2
push 0xffffffffffffffff
push eax
mov word [ebp - 0x364], ax
lea ecx, [ebp - 0x364]
lea eax, [ebp - 0x394]
mov dword [ebp - 0x350], 7
push eax
mov dword [ebp - 0x354], 0
call fcn.00402060
lea eax, [ebp - 0x37c]
mov byte [ebp - 4], 3
push eax
call fcn.0041c2ef
lea eax, [ebp - 0x364]
push eax
call fcn.0041c2ef
cmp dword [ebp - 0x350], 8
lea ecx, [ebp - 0x364]
push dword [ebp - 0x354]
cmovae ecx, dword [ebp - 0x364]
lea eax, [ebp - 0x37c]
cmp dword [ebp - 0x368], 8
push ecx
cmovae eax, dword [ebp - 0x37c]
push dword [ebp - 0x36c]
push eax
call fcn.004064a0
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x18
test eax, eax
je 0x40e94e
cmp dword [ebp - 0x398], 8
lea eax, [ebp - 0x3ac]
cmovae eax, dword [ebp - 0x3ac]
push eax
call esi
test eax, eax
je 0x40e94e
cmp dword [ebp - 0x398], 8
lea eax, [ebp - 0x3ac]
cmovae eax, dword [ebp - 0x3ac]
sub esp, 0x18
mov ecx, esp
push eax
call fcn.004035e0
call fcn.0041ba11
add esp, 0x18
push ebx
call esi
test eax, eax
je 0x40e968
sub esp, 0x18
mov ecx, esp
push ebx
call fcn.004035e0
call fcn.0041ba11
add esp, 0x18
mov ecx, dword [ebp - 0x5e4]
call fcn.0040f4c0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0048cfa0
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.0041b987
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 0x51aae8
call fcn.00402180
push 0xe
push 0x51aaec
lea ecx, [ebp - 0x34c]
mov byte [ebp - 4], 4
call fcn.00401f30
push 1
push 0x51aae8
lea ecx, [ebp - 0x34c]
call fcn.00401f30
push 1
xor eax, eax
mov dword [ebp - 0x320], 7
push 0x51aae8
lea ecx, [ebp - 0x334]
mov dword [ebp - 0x324], 0
mov word [ebp - 0x334], ax
call fcn.00402180
push 0xe
push str.e69ec06a19b74e
lea ecx, [ebp - 0x334]
mov byte [ebp - 4], 5
call fcn.00401f30
push 1
push 0x51aae8
lea ecx, [ebp - 0x334]
call fcn.00401f30
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 edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x40f2fd
push esi
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push edi
mov dword [ebp - 0x5ec], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push 0x1869f
push 0x2710
mov dword [ebp - 0x5e4], eax
call fcn.0041dccb
cdq
push edx
push eax
lea eax, [ebp - 0x43c]
push eax
call fcn.0041dc3e
add esp, 0x14
lea edi, [ebp - 0x218]
mov byte [ebp - 4], 6
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40eae4
mov ecx, 7
mov esi, str.LittlePicture
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x218]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40eb05
cmp dword [ebp - 0x428], 8
lea edx, [ebp - 0x43c]
mov eax, dword [0x51ab2c]
cmovae edx, dword [ebp - 0x43c]
mov dword [edi], eax
mov esi, edx
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x40eb30
lea edi, [ebp - 0x218]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x40eb46
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 0x40eb70
mov eax, dword [0x51ab30]
mov dword [ecx], eax
mov eax, dword [0x51ab34]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40ebab
lea eax, [ebp - 0x218]
push eax
call fcn.0041d865
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 0x40ebfe
push 0
lea eax, [ebp - 0x5f0]
mov dword [ebp - 0x5f0], 0
push eax
push dword [ebp - 0x5e4]
push dword [ebp - 0x5ec]
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.0048cfa0
lea eax, [ebp - 0x31c]
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.0041c2c0
add esp, 0x14
cmp dword [0x557b08], 0
jne 0x40ec35
call fcn.00407d30
mov ecx, dword [0x557b08]
call fcn.00405740
cmp dword [0x557b08], 0
jne 0x40ec4e
call fcn.00407d30
mov ecx, dword [0x557b08]
call fcn.00403b40
lea ecx, [ebp - 0x5e8]
xor esi, esi
cmp dword [ebp - 0x380], 8
lea eax, [ebp - 0x394]
push ecx
cmovae eax, dword [ebp - 0x394]
lea ecx, [ebp - 0x31c]
push fcn.0040f460
push ecx
push eax
mov dword [ebp - 0x5e8], esi
call fcn.0041dfa3
add esp, 0x10
mov dword [ebp - 0x410], 7
xor eax, eax
mov dword [ebp - 0x414], esi
lea ecx, [ebp - 0x424]
mov word [ebp - 0x424], ax
push eax
push 0x5197f0
call fcn.00402180
xor eax, eax
mov byte [ebp - 4], 7
push eax
push 0x5197f0
lea ecx, [ebp - 0x3c4]
mov dword [ebp - 0x3b0], 7
mov dword [ebp - 0x3b4], esi
mov word [ebp - 0x3c4], ax
call fcn.00402180
push ebx
lea ecx, [ebp - 0x3dc]
mov byte [ebp - 4], 8
call fcn.004035e0
push 0x12
push str.LittlePicMeans.exe
lea ecx, [ebp - 0x3dc]
mov byte [ebp - 4], 9
call fcn.00401f30
cmp dword [0x557b08], esi
jne 0x40ed1c
call fcn.00407d30
mov ecx, dword [0x557b08]
call fcn.00404740
cmp dword [0x557b08], 0
mov dword [ebp - 0x5ec], eax
jne 0x40ed3b
call fcn.00407d30
mov ecx, dword [0x557b08]
call fcn.00404720
mov ebx, eax
lea ecx, [ebp - 0x5bc]
push ebx
call fcn.004035e0
push 2
push 0
push 0x51ab38
lea ecx, [ebp - 0x5bc]
mov byte [ebp - 4], 0xa
call fcn.00406cf0
cmp dword [0x557b08], 0
mov dword [ebp - 0x5e4], eax
jne 0x40ed80
call fcn.00407d30
mov ecx, dword [0x557b08]
call fcn.00404700
test eax, eax
mov edi, 1
cmovne esi, edi
cmp dword [0x557b08], 0
mov dword [ebp - 0x5f4], esi
jne 0x40eda9
call fcn.00407d30
mov ecx, dword [0x557b08]
call fcn.004046c0
mov esi, eax
neg esi
sbb esi, esi
neg esi
cmp dword [0x557b08], 0
jne 0x40edca
call fcn.00407d30
mov ecx, dword [0x557b08]
call fcn.004046d0
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x5f0], eax
cmove edi, esi
mov dword [ebp - 0x5e0], 0
mov dword [ebp - 0x5dc], 0
mov dword [ebp - 0x5d8], 0
mov esi, dword [ebp - 0x5ec]
mov ecx, esi
mov byte [ebp - 4], 0xb
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ee10
sub ecx, edx
sar ecx, 1
je 0x40ef23
push str.b5e3
lea ecx, [ebp - 0x454]
call fcn.004035e0
lea eax, [ebp - 0x454]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
mov eax, dword [ebp - 0x440]
mov byte [ebp - 4], 0xb
cmp eax, 8
jb 0x40ee6d
inc eax
lea ecx, [ebp - 0x454]
push eax
push dword [ebp - 0x454]
call fcn.00402280
push esi
lea ecx, [ebp - 0x3f4]
call fcn.004035e0
lea eax, [ebp - 0x3f4]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
mov eax, dword [ebp - 0x3e0]
mov byte [ebp - 4], 0xb
cmp eax, 8
jb 0x40eeb1
inc eax
lea ecx, [ebp - 0x3f4]
push eax
push dword [ebp - 0x3f4]
call fcn.00402280
push str.2fdd
lea ecx, [ebp - 0x40c]
call fcn.004035e0
lea eax, [ebp - 0x40c]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
mov eax, dword [ebp - 0x3f8]
mov byte [ebp - 4], 0xb
cmp eax, 8
jb 0x40eef9
inc eax
lea ecx, [ebp - 0x40c]
push eax
push dword [ebp - 0x40c]
call fcn.00402280
push ebx
lea ecx, [ebp - 0x46c]
call fcn.004035e0
lea eax, [ebp - 0x46c]
mov byte [ebp - 4], 0xf
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x46c]
jmp 0x40ef80
push str.2fdd
lea ecx, [ebp - 0x484]
call fcn.004035e0
lea eax, [ebp - 0x484]
mov byte [ebp - 4], 0x10
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x484]
mov byte [ebp - 4], 0xb
call fcn.0040a770
push ebx
lea ecx, [ebp - 0x49c]
call fcn.004035e0
lea eax, [ebp - 0x49c]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x49c]
mov byte [ebp - 4], 0xb
call fcn.0040a770
cmp dword [ebp - 0x5e4], 0xffffffff
je 0x40effc
push str.e13a
lea ecx, [ebp - 0x4b4]
call fcn.004035e0
lea eax, [ebp - 0x4b4]
mov byte [ebp - 4], 0x12
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x4b4]
mov byte [ebp - 4], 0xb
call fcn.0040a770
push 0x51ab64
lea ecx, [ebp - 0x4cc]
call fcn.004035e0
lea eax, [ebp - 0x4cc]
mov byte [ebp - 4], 0x13
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x4cc]
mov byte [ebp - 4], 0xb
call fcn.0040a770
test edi, edi
jne 0x40f06a
push str.eca3
lea ecx, [ebp - 0x4e4]
call fcn.004035e0
lea eax, [ebp - 0x4e4]
mov byte [ebp - 4], 0x14
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x4e4]
mov byte [ebp - 4], 0xb
call fcn.0040a770
push 0x51a62c
lea ecx, [ebp - 0x4fc]
call fcn.004035e0
lea eax, [ebp - 0x4fc]
mov byte [ebp - 4], 0x15
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x4fc]
mov byte [ebp - 4], 0xb
call fcn.0040a770
cmp dword [ebp - 0x5f4], 0
jne 0x40f0dd
push str.41f0
lea ecx, [ebp - 0x514]
call fcn.004035e0
lea eax, [ebp - 0x514]
mov byte [ebp - 4], 0x16
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x514]
mov byte [ebp - 4], 0xb
call fcn.0040a770
push 0x51a62c
lea ecx, [ebp - 0x52c]
call fcn.004035e0
lea eax, [ebp - 0x52c]
mov byte [ebp - 4], 0x17
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x52c]
mov byte [ebp - 4], 0xb
call fcn.0040a770
cmp dword [ebp - 0x5f0], 0
jne 0x40f150
push str.f045
lea ecx, [ebp - 0x544]
call fcn.004035e0
lea eax, [ebp - 0x544]
mov byte [ebp - 4], 0x18
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x544]
mov byte [ebp - 4], 0xb
call fcn.0040a770
push 0x51a62c
lea ecx, [ebp - 0x55c]
call fcn.004035e0
lea eax, [ebp - 0x55c]
mov byte [ebp - 4], 0x19
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x55c]
mov byte [ebp - 4], 0xb
call fcn.0040a770
cmp dword [ebp + 0xc], 0
jne 0x40f1c0
push str.3961
lea ecx, [ebp - 0x574]
call fcn.004035e0
lea eax, [ebp - 0x574]
mov byte [ebp - 4], 0x1a
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x574]
mov byte [ebp - 4], 0xb
call fcn.0040a770
push 0x51a62c
lea ecx, [ebp - 0x58c]
call fcn.004035e0
lea eax, [ebp - 0x58c]
mov byte [ebp - 4], 0x1b
push eax
lea ecx, [ebp - 0x5e0]
call fcn.00406de0
lea ecx, [ebp - 0x58c]
mov byte [ebp - 4], 0xb
call fcn.0040a770
push 0x51aba0
lea ecx, [ebp - 0x5a4]
call fcn.004035e0
lea eax, [ebp - 0x5e0]
mov byte [ebp - 4], 0x1c
push eax
lea eax, [ebp - 0x5a4]
push eax
lea eax, [ebp - 0x5d4]
push eax
call fcn.0041bd6b
add esp, 0xc
lea ecx, [ebp - 0x3c4]
push eax
call fcn.00408c90
lea ecx, [ebp - 0x5d4]
call fcn.0040a770
lea ecx, [ebp - 0x5a4]
mov byte [ebp - 4], 0xb
call fcn.0040a770
cmp dword [ebp - 0x3b0], 8
lea ecx, [ebp - 0x3c4]
push 0x2710
cmovae ecx, dword [ebp - 0x3c4]
lea eax, [ebp - 0x3dc]
cmp dword [ebp - 0x3c8], 8
push 1
cmovae eax, dword [ebp - 0x3dc]
push ecx
push eax
call fcn.0041c60b
mov esi, dword [ebp - 0x5e8]
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 - 0x5e8], esi
call fcn.0040f460
mov ecx, dword [ebp - 0x5e8]
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 - 0x5e8], ecx
call fcn.0040f460
add esp, 0x20
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x64
push 0x64
call fcn.0040f460
add esp, 8
lea ecx, [ebp - 0x5e0]
call fcn.00403850
lea ecx, [ebp - 0x5bc]
call fcn.0040a770
lea ecx, [ebp - 0x3dc]
call fcn.0040a770
lea ecx, [ebp - 0x3c4]
call fcn.0040a770
lea ecx, [ebp - 0x424]
call fcn.0040a770
lea ecx, [ebp - 0x43c]
call fcn.0040a770
mov eax, dword [ebp - 0x320]
cmp eax, 8
jb 0x40f31b
inc eax
lea ecx, [ebp - 0x334]
push eax
push dword [ebp - 0x334]
call fcn.00402280
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 0x40f356
inc eax
lea ecx, [ebp - 0x34c]
push eax
push dword [ebp - 0x34c]
call fcn.00402280
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 0x40f391
inc eax
lea ecx, [ebp - 0x364]
push eax
push dword [ebp - 0x364]
call fcn.00402280
xor eax, eax
mov dword [ebp - 0x350], 7
mov word [ebp - 0x364], ax
mov eax, dword [ebp - 0x368]
mov dword [ebp - 0x354], 0
cmp eax, 8
jb 0x40f3cc
inc eax
lea ecx, [ebp - 0x37c]
push eax
push dword [ebp - 0x37c]
call fcn.00402280
xor eax, eax
mov dword [ebp - 0x368], 7
mov word [ebp - 0x37c], ax
mov eax, dword [ebp - 0x380]
mov dword [ebp - 0x36c], 0
cmp eax, 8
jb 0x40f407
inc eax
lea ecx, [ebp - 0x394]
push eax
push dword [ebp - 0x394]
call fcn.00402280
xor eax, eax
mov dword [ebp - 0x380], 7
mov word [ebp - 0x394], ax
mov eax, dword [ebp - 0x398]
mov dword [ebp - 0x384], 0
cmp eax, 8
jb 0x40f442
inc eax
lea ecx, [ebp - 0x3ac]
push eax
push dword [ebp - 0x3ac]
call fcn.00402280
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.00413012
mov esp, ebp
pop ebp
ret 0xc