Function at 0x10013870
Capabilities:
Check if file exists
Extract resource via kernel32 functions
Get file attributes
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003f39f
mov eax, dword fs:[0]
push eax
sub esp, 0x654
mov eax, dword [0x10070024]
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 - 0x65c], edx
mov bl, cl
mov byte [ebp - 0x649], bl
xor eax, eax
push 0x100462d4
mov dword [ebp - 0x654], eax
push 0x100462dc
push dword [0x1007b040]
mov dword [ebp - 0x658], eax
mov dword [ebp - 0x650], eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x10013927
push edi
push dword [0x1007b040]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push edi
push dword [0x1007b040]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, 0x400
cmp edi, esi
cmovb esi, edi
push esi
push eax
lea eax, [ebp - 0x410]
mov dword [ebp - 0x650], esi
push eax
call fcn.10004ee0
add esp, 0xc
jmp 0x10013c9b
or esi, 0xffffffff
mov dword [ebp - 0x654], esi
push 0x104
lea eax, [ebp - 0x618]
mov dword [ebp - 4], 0
push eax
push dword [0x1007b040]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebp - 0x630], 0
lea ecx, [ebp - 0x618]
mov dword [ebp - 0x620], 0
mov dword [ebp - 0x61c], 7
lea edx, [ecx + 2]
mov word [ebp - 0x630], ax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10013980
sub ecx, edx
lea eax, [ebp - 0x618]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x630]
call fcn.10001630
mov eax, 1
mov dword [ebp - 0x658], eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x648]
push 4
xor eax, eax
mov dword [ebp - 0x648], 0
push str..dna
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x634], 7
mov word [ebp - 0x648], ax
call fcn.10001630
mov byte [ebp - 4], 2
lea edx, [ebp - 0x630]
cmp dword [ebp - 0x61c], 8
mov eax, dword [ebp - 0x620]
cmovae edx, dword [ebp - 0x630]
test eax, eax
je 0x10013a33
or ecx, 0xffffffff
dec eax
cmp eax, ecx
cmovb ecx, eax
cmp word [edx + ecx*2], 0x2e
lea ecx, [edx + ecx*2]
je 0x10013a2d
nop
cmp ecx, edx
je 0x10013a33
sub ecx, 2
cmp word [ecx], 0x2e
jne 0x10013a20
sub ecx, edx
sar ecx, 1
jmp 0x10013a36
or ecx, 0xffffffff
cmp dword [ebp - 0x634], 8
lea eax, [ebp - 0x648]
push dword [ebp - 0x638]
cmovae eax, dword [ebp - 0x648]
push eax
push ecx
push ecx
lea ecx, [ebp - 0x630]
call fcn.100014a0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x634]
cmp edx, 8
jb 0x10013aa2
mov ecx, dword [ebp - 0x648]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10013a98
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100140d4
push edx
push ecx
call fcn.10002353
add esp, 8
cmp dword [ebp - 0x61c], 8
lea eax, [ebp - 0x630]
cmovae eax, dword [ebp - 0x630]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x10014017
test al, 0x10
jne 0x10014017
lea eax, [ebp - 0x630]
push eax
lea ecx, [ebp - 0x648]
call fcn.100013c0
cmp dword [ebp - 0x634], 8
lea eax, [ebp - 0x648]
push 0
cmovae eax, dword [ebp - 0x648]
push 0x80
push 3
push 0
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [ebp - 0x654], esi
cmp esi, 0xffffffff
jne 0x10013b92
call ebx
mov edi, eax
test edi, edi
jle 0x10013b31
movzx edi, di
or edi, 0x80070000
mov edx, dword [ebp - 0x634]
cmp edx, 8
jb 0x10013b71
mov ecx, dword [ebp - 0x648]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10013b67
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100140bb
push edx
push ecx
call fcn.10002353
add esp, 8
test edi, edi
jns 0x10013bd2
cmp byte [ebp - 0x649], 0
je 0x10014035
mov edx, 0x98
push edi
push 0x76
lea ecx, [edx - 1]
jmp 0x1001402d
mov edx, dword [ebp - 0x634]
cmp edx, 8
jb 0x10013bd2
mov ecx, dword [ebp - 0x648]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10013bc8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100140bb
push edx
push ecx
call fcn.10002353
add esp, 8
push 0
lea eax, [ebp - 0x650]
push eax
push 0x400
lea eax, [ebp - 0x410]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10013c21
call ebx
test eax, eax
jle 0x10013c02
movzx eax, ax
or eax, 0x80070000
test eax, eax
jns 0x10013c21
cmp byte [ebp - 0x649], 0
je 0x10014035
mov edx, 0x98
push eax
push 0x76
lea ecx, [edx - 1]
jmp 0x1001402d
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x61c]
cmp edx, 8
jb 0x10013c65
mov ecx, dword [ebp - 0x630]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10013c5b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100140d4
push edx
push ecx
call fcn.10002353
add esp, 8
xor eax, eax
mov dword [ebp - 0x620], 0
mov dword [ebp - 0x61c], 7
mov word [ebp - 0x630], ax
mov dword [ebp - 4], 0xffffffff
cmp esi, 0xffffffff
je 0x10013c95
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x650]
cmp esi, 3
jb 0x10013d5a
mov al, byte [ebp - 0x410]
cmp al, 0xef
je 0x10013d5a
cmp al, 0xff
jne 0x10013cbf
cmp byte [ebp - 0x40f], 0xfe
jmp 0x10013cce
cmp al, 0xfe
jne 0x10013d5a
cmp byte [ebp - 0x40f], 0xff
jne 0x10013d5a
push esi
lea eax, [ebp - 0x410]
mov dword [ebp - 0x648], 0
push eax
lea ecx, [ebp - 0x648]
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x634], 7
call fcn.10001630
mov ecx, dword [ebp - 0x65c]
lea eax, [ebp - 0x648]
push eax
call fcn.100012e0
mov edx, dword [ebp - 0x634]
cmp edx, 8
jb 0x10014010
mov ecx, dword [ebp - 0x648]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10014006
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100140c0
jmp 0x10014006
mov dword [ebp - 0x648], 0
mov dword [ebp - 0x638], 0
mov dword [ebp - 0x634], 0xf
mov byte [ebp - 0x648], 0
cmp esi, 0xf
ja 0x10013db1
push esi
lea eax, [ebp - 0x410]
mov dword [ebp - 0x638], esi
push eax
lea eax, [ebp - 0x648]
push eax
call fcn.10004ee0
mov byte [ebp + esi - 0x648], 0
mov ebx, dword [ebp - 0x648]
jmp 0x10013e48
cmp esi, 0x7fffffff
ja 0x100140c5
mov edi, esi
or edi, 0xf
cmp edi, 0x7fffffff
jbe 0x10013df0
mov edi, SysReAllocString
mov ecx, 0x80000023
push ecx
call fcn.10002384
add esp, 4
test eax, eax
je 0x100140cf
lea ebx, [eax + 0x23]
and ebx, 0xffffffe0
mov dword [ebx - 4], eax
jmp 0x10013e24
mov eax, 0x16
cmp edi, eax
cmovb edi, eax
lea eax, [edi + 1]
cmp eax, 0x1000
jb 0x10013e11
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x100140ca
jmp 0x10013dd4
test eax, eax
je 0x10013e22
push eax
call fcn.10002384
add esp, 4
mov ebx, eax
jmp 0x10013e24
xor ebx, ebx
push esi
lea eax, [ebp - 0x410]
mov dword [ebp - 0x638], esi
push eax
push ebx
mov dword [ebp - 0x634], edi
call fcn.10004ee0
mov byte [ebx + esi], 0
mov dword [ebp - 0x648], ebx
add esp, 0xc
mov dword [ebp - 4], 4
xor eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x630], 0
mov word [ebp - 0x630], ax
mov eax, dword [ebp - 0x658]
or eax, 2
mov dword [ebp - 0x620], 0
cmp dword [ebp - 0x634], 0x10
push 0
push 0
mov dword [ebp - 0x654], eax
lea eax, [ebp - 0x648]
push 0xffffffffffffffff
cmovae eax, ebx
mov dword [ebp - 0x61c], 7
push eax
push 0
push 0xfde9
call edi
mov esi, eax
cmp esi, 1
jle 0x10013f67
mov ecx, dword [ebp - 0x620]
cmp esi, ecx
ja 0x10013ee5
cmp dword [ebp - 0x61c], 8
lea ecx, [ebp - 0x630]
mov dword [ebp - 0x620], esi
cmovae ecx, dword [ebp - 0x630]
xor eax, eax
mov word [ecx + esi*2], ax
jmp 0x10013ef6
push ecx
mov eax, esi
sub eax, ecx
lea ecx, [ebp - 0x630]
push eax
call fcn.10001730
cmp dword [ebp - 0x61c], 8
lea ecx, [ebp - 0x630]
push esi
cmovae ecx, dword [ebp - 0x630]
lea eax, [ebp - 0x648]
cmp dword [ebp - 0x634], 0x10
push ecx
cmovae eax, dword [ebp - 0x648]
push 0xffffffffffffffff
push eax
push 0
push 0xfde9
call edi
mov ecx, dword [ebp - 0x620]
cmp eax, ecx
ja 0x10013f58
cmp dword [ebp - 0x61c], 8
lea ecx, [ebp - 0x630]
mov dword [ebp - 0x620], eax
cmovae ecx, dword [ebp - 0x630]
xor edx, edx
mov word [ecx + eax*2], dx
jmp 0x10013f67
push ecx
sub eax, ecx
lea ecx, [ebp - 0x630]
push eax
call fcn.10001730
mov ecx, dword [ebp - 0x65c]
lea eax, [ebp - 0x630]
push eax
call fcn.100012e0
mov edx, dword [ebp - 0x61c]
cmp edx, 8
jb 0x10013fb9
mov ecx, dword [ebp - 0x630]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10013faf
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100140cf
push edx
push ecx
call fcn.10002353
add esp, 8
mov edx, dword [ebp - 0x634]
xor eax, eax
mov dword [ebp - 0x620], 0
mov dword [ebp - 0x61c], 7
mov word [ebp - 0x630], ax
cmp edx, 0x10
jb 0x10014010
mov ecx, dword [ebp - 0x648]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10014006
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100140cf
push edx
push ecx
call fcn.10002353
add esp, 8
xor eax, eax
jmp 0x1001409f
test bl, bl
je 0x10014035
mov edx, 0x95
push 0x80004005
push 0x96
lea ecx, [edx - 1]
call fcn.100150e0
add esp, 8
mov edx, dword [ebp - 0x61c]
cmp edx, 8
jb 0x10014071
mov ecx, dword [ebp - 0x630]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10014067
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100140d4
push edx
push ecx
call fcn.10002353
add esp, 8
xor eax, eax
mov dword [ebp - 0x620], 0
mov dword [ebp - 0x61c], 7
mov word [ebp - 0x630], ax
cmp esi, 0xffffffff
je 0x1001409a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x80004005
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.10002345
mov esp, ebp
pop ebp
ret
call fcn.10005d83
call fcn.10005d83
call fcn.10001190
call fcn.100010f0
call fcn.10005d83
call fcn.10005d83
int3