Function at 0x40f590
Capabilities:
Contain obfuscated stackstrings
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x16a]
sub esp, 0x19c
mov dword [ebp - 0x180], edx
xor edx, edx
mov dword [ebp - 0x16a], 0x3a0061
mov dword [ebp - 0x166], 0x2e005c
mov dword [ebp - 0x162], 0x690077
mov dword [ebp - 0x15e], 0x64006e
mov dword [ebp - 0x15a], 0x77006f
mov dword [ebp - 0x156], 0x2d0073
mov dword [ebp - 0x152], 0x650073
mov dword [ebp - 0x14e], 0x690072
mov dword [ebp - 0x14a], 0x6c0061
mov word [ebp - 0x146], dx
mov word [ebp - 0x16a], ax
test byte [0x415050], 8
jne 0x40f6c8
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x40000000
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x40f6bd
mov eax, dword [ebp - 0x180]
lea esi, [ebp - 0x144]
mov dword [esp + 4], str._lX_n
mov dword [esp], esi
mov dword [esp + 8], eax
call sym._sprintf.constprop.0
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
lea edx, [ebp - 0x170]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, ebx
shr eax, 0x10
je 0x40f8c0
mov dword [esp + 4], 0xffffffff
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_IsBadStringPtrW]
mov ecx, eax
sub esp, 8
mov eax, 0x417a39
test ecx, ecx
jne 0x40f7dc
movzx eax, word [ebp - 0x16a]
test ax, ax
je 0x40f8f0
lea esi, [esi]
lea esi, [esi]
mov edx, ecx
lea ecx, [ecx + 1]
cmp word [ebx + edx*2 + 2], 0
jne 0x40f710
mov ecx, 0x224c
mov dword [ebp - 0x17c], edx
mov esi, ebx
mov word [ebp - 0x144], cx
lea ecx, [ebp - 0x142]
jmp 0x40f77d
cmp ax, 9
je 0x40f8a8
cmp ax, 0xa
jne 0x40f836
mov eax, 0x6e5c
add ecx, 2
mov word [ecx - 2], ax
mov edx, dword [ebp - 0x17c]
lea eax, [ebp - 0x22]
lea edi, [edx - 1]
cmp ecx, eax
ja 0x40f7b0
test edx, edx
jle 0x40f7b0
mov dword [ebp - 0x17c], edi
movzx eax, word [esi]
add esi, 2
cmp ax, 0xd
je 0x40f818
jbe 0x40f740
cmp ax, 0x22
je 0x40f890
cmp ax, 0x5c
jne 0x40f829
mov edi, 0x5c5c
add ecx, 2
mov word [ecx - 2], di
jmp 0x40f760
mov byte [ecx], 0x22
test edi, edi
jle 0x40f909
mov esi, 0x2e2e
mov byte [ecx + 3], 0x2e
lea eax, [ecx + 4]
mov word [ecx + 1], si
mov byte [eax], 0
lea eax, [ebp - 0x144]
mov dword [esp], eax
call sym.___wine_dbg_strdup
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x180]
mov dword [esp + 0xc], str.Putting_serial_number_of__08lX_into_file__s_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.set_drive_serial
mov dword [esp + 4], 0x415050
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_2
jmp 0x40f61f
mov eax, 0x725c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40f760
lea edi, [eax - 0x20]
cmp di, 0x5e
jbe 0x40f8e0
mov edi, eax
mov byte [ecx], 0x5c
add ecx, 5
shr di, 0xc
movzx edi, di
movzx edx, byte [edi + 0x4231b0]
mov edi, eax
shr di, 8
and edi, 0xf
mov byte [ecx - 4], dl
movzx edx, byte [edi + 0x4231b0]
mov edi, eax
and eax, 0xf
shr di, 4
movzx eax, byte [eax + 0x4231b0]
and edi, 0xf
mov byte [ecx - 3], dl
movzx edx, byte [edi + 0x4231b0]
mov byte [ecx - 1], al
mov byte [ecx - 2], dl
jmp 0x40f760
mov eax, 0x225c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40f760
mov eax, 0x745c
add ecx, 2
mov word [ecx - 2], ax
jmp 0x40f760
movzx eax, bx
mov dword [esp], 0x417a2c
mov dword [esp + 4], eax
call sym._wine_dbg_sprintf.constprop.0_2
jmp 0x40f7dc
mov byte [ecx], al
inc ecx
jmp 0x40f760
mov eax, 0x224c
mov byte [ebp - 0x142], 0x22
lea ecx, [ebp - 0x142]
mov word [ebp - 0x144], ax
lea eax, [ecx + 1]
jmp 0x40f7cb