Function at 0x10004940
Capabilities:
Check os version
Delete file
Get common file path
Write file on windows

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x220]
push ebx
push ecx
sub esp, 0x624
mov eax, dword [ecx + 4]
mov ebx, dword [ecx]
mov dword [ebp - 0x60c], eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0x618], eax
test byte [0x100110ac], 8
jne 0x1000504a
lea eax, [ebp - 0x428]
mov dword [esp + 4], 0x104
lea ebx, [ebp - 0x5e8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryW]
mov eax, esi
shr eax, 0x10
sub esp, 8
mov dword [ebp - 0x614], eax
lea esi, [esi]
xor eax, eax
lea esi, [esi]
movzx edx, word [ebp + eax - 0x428]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x100049b8
mov eax, dword [0x100110a8]
mov dword [esp + 8], str.TasksAt_u.job
mov dword [esp + 4], 0x20
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call sym._swprintf.constprop.0
cmp word [ebp - 0x220], 0
mov edx, esi
je 0x10004a09
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x10004a00
xor eax, eax
nop
lea esi, [esi]
movzx ecx, word [ebx + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x10004a10
test byte [0x100110ac], 8
jne 0x10004c90
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [ebp - 0x608], eax
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x10004c6e
call dword [sym.imp.kernel32.dll_GetVersion]
rol ax, 8
mov word [ebp - 0x5a8], ax
mov eax, 1
mov word [ebp - 0x5a6], ax
lea eax, [ebp - 0x5a4]
mov dword [esp], eax
call dword [sym.imp.rpcrt4.dll_UuidCreate]
mov eax, dword [ebp - 0x60c]
mov dword [ebp - 0x594], 0x460046
sub esp, 4
mov eax, dword [eax + 0xc]
cmp word [eax], 0
je 0x10004ecf
mov ecx, eax
lea esi, [esi]
lea edi, [edi]
add ecx, 2
cmp word [ecx], 0
jne 0x10004ad0
sub ecx, eax
add ecx, 0x5a
cmp word [str.Wine], 0
je 0x10004eb2
mov eax, str.Wine
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x10004af8
sub eax, 0x1001103c
cmp word [str.Created_by_Wine], 0
je 0x10004ec5
mov edx, str.Created_by_Wine
lea esi, [esi]
add edx, 2
cmp word [edx], 0
jne 0x10004b20
sub edx, 0x1001101c
add eax, ecx
lea edi, [ebp - 0x600]
movdqu xmm0, xmmword [0x10013860]
mov dword [ebp - 0x590], 0
mov dword [ebp - 0x58c], 0xa003c
add edx, eax
mov eax, dword [ebp - 0x60c]
mov word [ebp - 0x592], dx
test byte [eax + 9], 0x10
mov dword [esp + 0xc], edi
sete al
mov dword [ebp - 0x574], 0
movzx eax, al
mov dword [ebp - 0x570], 0
add eax, 2
mov dword [esp + 0x10], 0
mov dword [ebp - 0x578], eax
lea eax, [ebp - 0x5a8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x608]
mov dword [ebp - 0x56c], 0
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [ebp - 0x568], 0
mov dword [esp + 8], 0x44
mov dword [ebp - 0x610], eax
movups xmmword [ebp - 0x588], xmm0
call eax
sub esp, 0x14
test eax, eax
je 0x10004c50
lea ecx, [ebp - 0x604]
xor eax, eax
mov dword [esp + 0xc], edi
mov dword [esp + 4], ecx
mov ecx, dword [ebp - 0x608]
mov word [ebp - 0x604], ax
mov eax, dword [ebp - 0x610]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 2
mov dword [esp], ecx
call eax
sub esp, 0x14
test eax, eax
je 0x10004c50
mov edx, dword [ebp - 0x60c]
mov eax, dword [ebp - 0x608]
mov edx, dword [edx + 0xc]
call sym._write_unicode_string
test eax, eax
je 0x10004c50
mov eax, dword [ebp - 0x608]
xor edx, edx
call sym._write_unicode_string
test eax, eax
jne 0x10004efa
nop
lea esi, [esi]
mov eax, dword [ebp - 0x608]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_DeleteFileW]
sub esp, 4
mov eax, dword fs:[0x18]
cmp dword [eax + 0x34], 0x50
jne 0x10005028
lock add dword [0x100110a8], 1
jmp 0x100049b0
mov eax, dword [ebp - 0x614]
test eax, eax
je 0x10004e88
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, 0x10013007
sub esp, 8
test eax, eax
jne 0x10004dac
cmp word [ebp - 0x220], 0
je 0x10004ed9
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [esi + edx*2 + 2], 0
jne 0x10004cd0
mov eax, 0x224c
mov dword [ebp - 0x608], edx
lea ecx, [ebp - 0x556]
mov edi, esi
mov word [ebp - 0x558], ax
mov dword [ebp - 0x610], esi
jmp 0x10004d3d
cmp ax, 9
je 0x10004df8
cmp ax, 0xa
jne 0x10004e16
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
mov edx, dword [ebp - 0x608]
lea esi, [ebp - 0x436]
lea eax, [edx - 1]
cmp ecx, esi
ja 0x10004d78
test edx, edx
jle 0x10004d78
mov dword [ebp - 0x608], eax
movzx eax, word [edi]
add edi, 2
cmp ax, 0xd
je 0x10004de0
jbe 0x10004d00
cmp ax, 0x22
je 0x10004e70
cmp ax, 0x5c
jne 0x10004e09
mov esi, 0x5c5c
add ecx, 2
mov word [ecx - 2], si
jmp 0x10004d20
mov byte [ecx], 0x22
mov esi, dword [ebp - 0x610]
test eax, eax
jle 0x10004ef2
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
mov byte [eax], 0
lea eax, [ebp - 0x558]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov edx, eax
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.trying_to_create_job__s_n
mov dword [esp + 8], str.create_job
mov dword [esp + 4], 0x100110ac
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x10004a2d
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x10004d20
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x10004d20
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x10004ea8
mov esi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx edx, byte [esi + str.0123456789abcdefload_job]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ecx - 4], dl
movzx edx, byte [esi + str.0123456789abcdefload_job]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdefload_job]
and esi, 0xf
mov byte [ecx - 3], dl
movzx edx, byte [esi + str.0123456789abcdefload_job]
mov byte [ecx - 1], al
mov byte [ecx - 2], dl
jmp 0x10004d20
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x10004d20
movzx eax, si
mov dword [esp], 0x10013011
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf
mov edx, eax
jmp 0x10004dac
mov byte [ecx], al
add ecx, 1
jmp 0x10004d20
cmp word [str.Created_by_Wine], 0
mov eax, 4
jne 0x10004b14
mov edx, 4
jmp 0x10004b2f
mov ecx, 0x5a
jmp 0x10004ade
mov edi, 0x224c
mov byte [ebp - 0x556], 0x22
lea ecx, [ebp - 0x556]
mov word [ebp - 0x558], di
lea eax, [ecx + 1]
jmp 0x10004d99
mov eax, dword [ebp - 0x608]
xor edx, edx
call sym._write_unicode_string
test eax, eax
je 0x10004c50
mov eax, dword [ebp - 0x608]
mov edx, str.Wine
call sym._write_unicode_string
test eax, eax
je 0x10004c50
mov eax, dword [ebp - 0x608]
mov edx, str.Created_by_Wine
call sym._write_unicode_string
test eax, eax
je 0x10004c50
mov ecx, dword [ebp - 0x608]
xor eax, eax
lea edx, [ebp - 0x604]
mov dword [esp + 0xc], edi
mov word [ebp - 0x604], ax
mov edi, dword [ebp - 0x610]
mov dword [esp + 0x10], 0
mov dword [esp + 8], 2
mov dword [esp + 4], edx
mov dword [esp], ecx
call edi
sub esp, 0x14
test eax, eax
je 0x10004c50
mov ecx, dword [ebp - 0x608]
lea eax, [ebp - 0x558]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0x10013724
mov dword [esp], ecx
mov dword [ebp - 0x610], edi
call edi
sub esp, 0x14
test eax, eax
je 0x10004c50
mov ecx, dword [ebp - 0x608]
mov eax, 1
lea edi, [ebp - 0x5fc]
mov dword [esp + 0x10], 0
mov word [ebp - 0x602], ax
lea eax, [ebp - 0x602]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x610]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 2
mov dword [esp], ecx
call eax
sub esp, 0x14
test eax, eax
jne 0x100052a8
mov ecx, dword [ebp - 0x608]
mov dword [esp], ecx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
jmp 0x10004c62
test byte [0x100110ac], 8
jne 0x100051a8
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
test ebx, ebx
je 0x10005280
mov eax, ebx
shr eax, 0x10
je 0x10005130
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, 0x10013007
sub esp, 8
test eax, eax
jne 0x10005145
cmp word [ebx], 0
je 0x1000528a
nop
lea esi, [esi]
mov edx, eax
lea eax, [eax + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x10005090
mov ecx, 0x224c
mov dword [ebp - 0x608], ebx
lea edi, [ebp - 0xfe]
mov word [ebp - 0x220], cx
lea ecx, [ebp - 0x21e]
jmp 0x100050f5
cmp ax, 9
je 0x10005197
cmp ax, 0xa
jne 0x100051e5
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
lea esi, [esi]
lea eax, [edx - 1]
test edx, edx
jle 0x10005247
cmp ecx, edi
ja 0x10005247
mov edx, eax
add dword [ebp - 0x608], 2
mov eax, dword [ebp - 0x608]
movzx eax, word [eax - 2]
cmp ax, 0xd
je 0x10005186
jbe 0x100050bd
cmp ax, 0x22
je 0x10005236
cmp ax, 0x5c
jne 0x100051d8
mov ebx, 0x5c5c
add ecx, 2
mov word [ecx - 2], bx
jmp 0x100050e0
movzx ebx, bx
mov dword [esp], 0x10013011
mov dword [esp + 4], ebx
call sym._wine_dbg_sprintf
mov edx, eax
mov eax, dword [ebp - 0x618]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str._s__p__p_n
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x60c]
mov dword [esp + 8], str.NetrJobAdd
mov dword [esp + 0x14], eax
mov dword [esp + 4], 0x100110ac
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x1000497e
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x100050e0
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x100050e0
mov eax, dword [eax + 0x34]
mov dword [esp + 0xc], str.create_job_error__lu_n
mov dword [esp + 8], str.NetrJobAdd
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x100110ac
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0
jmp 0x10005035
lea esi, [eax - 0x20]
cmp si, 0x5e
jbe 0x10005276
mov esi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefload_job]
mov esi, eax
shr si, 8
and esi, 0xf
mov byte [ecx - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefload_job]
mov esi, eax
and eax, 0xf
shr si, 4
movzx eax, byte [eax + str.0123456789abcdefload_job]
and esi, 0xf
mov byte [ecx - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefload_job]
mov byte [ecx - 1], al
mov byte [ecx - 2], bl
jmp 0x100050e0
mov esi, 0x225c
add ecx, 2
mov word [ecx - 2], si
jmp 0x100050e0
mov byte [ecx], 0x22
test eax, eax
jle 0x100052a3
mov edx, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], dx
lea esi, [ebp - 0x220]
mov byte [eax], 0
mov dword [esp], esi
call sym.___wine_dbg_strdup
mov edx, eax
jmp 0x10005145
mov byte [ecx], al
add ecx, 1
jmp 0x100050e0
mov edx, section..rdata
jmp 0x10005145
mov eax, 0x224c
mov byte [ebp - 0x21e], 0x22
lea ecx, [ebp - 0x21e]
mov word [ebp - 0x220], ax
lea eax, [ecx + 1]
jmp 0x1000525e
lea eax, [ebp - 0x5f8]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetSystemTime]
movzx eax, word [ebp - 0x5f6]
movzx edx, word [ebp - 0x5f8]
mov dword [ebp - 0x558], 0x30
sub esp, 4
movzx ecx, word [ebp - 0x5f2]
movdqu xmm1, xmmword [0x10013870]
mov dword [ebp - 0x534], 0
mov word [ebp - 0x552], ax
mov word [ebp - 0x54c], ax
mov eax, dword [ebp - 0x5f0]
mov dword [esp + 0xc], edi
mov edi, dword [ebp - 0x610]
mov dword [ebp - 0x548], eax
mov eax, 0xffffffff
mov word [ebp - 0x530], ax
lea eax, [ebp - 0x558]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x608]
mov word [ebp - 0x554], dx
mov word [ebp - 0x550], cx
mov word [ebp - 0x54e], dx
mov word [ebp - 0x54a], cx
mov dword [ebp - 0x52c], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x30
mov dword [esp], eax
movups xmmword [ebp - 0x544], xmm1
call edi
sub esp, 0x14
test eax, eax
je 0x10004c50
lea edx, [ebp - 0x554]
xor eax, eax
mov ecx, 0x10
mov dword [ebp - 0x558], 0x10001
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x608]
lea ecx, [ebp - 0x5f8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
lea ecx, [ebp - 0x558]
mov edi, dword [ebp - 0x610]
mov dword [esp + 8], 0x44
mov dword [esp + 4], ecx
mov dword [esp], eax
call edi
sub esp, 0x14
test eax, eax
mov eax, dword [ebp - 0x608]
mov dword [esp], eax
je 0x10004c59
call dword [sym.imp.kernel32.dll_CloseHandle]
mov ebx, 5
sub esp, 4
lea esi, [esi]
mov dword [esp], 0x10011080
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
xor edx, edx
mov eax, esi
sub esp, 4
call sym._find_job.constprop.0
mov dword [esp], 0x10011080
mov edi, eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
sub esp, 4
test edi, edi
jne 0x10005528
mov dword [esp], 0x32
call dword [sym.imp.kernel32.dll_Sleep]
sub esp, 4
sub ebx, 1
jne 0x100053f0
mov eax, 2
test byte [0x100110ac], 2
je 0x1000503e
mov edi, dword [ebp - 0x614]
test edi, edi
je 0x1000563a
mov dword [esp + 4], 0xffffffff
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov edx, eax
sub esp, 8
mov eax, 0x10013007
test edx, edx
jne 0x1000556d
cmp word [ebp - 0x220], 0
je 0x10005652
mov ecx, edx
lea edx, [edx + 1]
cmp word [esi + ecx*2 + 2], 0
jne 0x10005489
mov eax, 0x224c
mov dword [ebp - 0x608], esi
lea edi, [ebp - 0x436]
mov word [ebp - 0x558], ax
lea eax, [ebp - 0x556]
jmp 0x100054e3
cmp dx, 9
je 0x1000561f
cmp dx, 0xa
jne 0x100055ac
mov esi, 0x6e5c
add eax, 2
mov word [eax - 2], si
lea edx, [ecx - 1]
test ecx, ecx
jle 0x10005541
cmp eax, edi
ja 0x10005541
mov ecx, edx
add dword [ebp - 0x608], 2
mov ebx, dword [ebp - 0x608]
movzx edx, word [ebx - 2]
cmp dx, 0xd
je 0x1000560e
jbe 0x100054b6
cmp dx, 0x22
je 0x100055fd
cmp dx, 0x5c
jne 0x1000559f
mov ebx, 0x5c5c
add eax, 2
mov word [eax - 2], bx
jmp 0x100054d6
mov eax, dword [edi + 0x14]
mov edi, dword [ebp - 0x618]
mov dword [edi], eax
lea esp, [ebp - 0x10]
xor eax, eax
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov byte [eax], 0x22
test edx, edx
jle 0x1000566b
mov ecx, 0x2e2e
mov byte [eax + 3], 0x2e
lea edx, [eax + 4]
mov word [eax + 1], cx
lea eax, [ebp - 0x558]
mov byte [edx], 0
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.couldnt_find_just_created_job__s_n
mov dword [esp + 8], str.NetrJobAdd
mov dword [esp + 4], 0x100110ac
mov dword [esp], 1
call sym._wine_dbg_log.constprop.0
mov eax, 2
jmp 0x1000503e
lea esi, [edx - 0x20]
cmp si, 0x5e
jbe 0x10005630
mov esi, edx
mov byte [eax], 0x5c
add eax, 5
shr si, 0xc
movzx esi, si
movzx ebx, byte [esi + str.0123456789abcdefload_job]
mov esi, edx
shr si, 8
and esi, 0xf
mov byte [eax - 4], bl
movzx ebx, byte [esi + str.0123456789abcdefload_job]
mov esi, edx
and edx, 0xf
shr si, 4
movzx edx, byte [edx + str.0123456789abcdefload_job]
and esi, 0xf
mov byte [eax - 3], bl
movzx ebx, byte [esi + str.0123456789abcdefload_job]
mov byte [eax - 1], dl
mov byte [eax - 2], bl
jmp 0x100054d6
mov esi, 0x225c
add eax, 2
mov word [eax - 2], si
jmp 0x100054d6
mov ebx, 0x725c
add eax, 2
mov word [eax - 2], bx
jmp 0x100054d6
mov edx, 0x745c
add eax, 2
mov word [eax - 2], dx
jmp 0x100054d6
mov byte [eax], dl
add eax, 1
jmp 0x100054d6
movzx eax, si
mov dword [esp], 0x10013011
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf
jmp 0x1000556d
mov byte [ebp - 0x556], 0x22
mov eax, 0x224c
mov word [ebp - 0x558], ax
lea eax, [ebp - 0x556]
lea edx, [eax + 1]
jmp 0x1000555c