Function at 0x401040
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40d1e6
mov eax, dword fs:[0]
push eax
sub esp, 0x648
mov eax, dword [0x411020]
xor eax, esp
mov dword [esp + 0x640], eax
push ebx
push esi
push edi
mov eax, dword [0x411020]
xor eax, esp
push eax
lea eax, [esp + 0x658]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
xor esi, esi
mov dword [esp + 0x18], vtable.slDrvPnp98.0
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x660], esi
mov dword [esp + 0x10], vtable.slDrvFile.0
mov dword [esp + 0x14], esi
push 0x20c
lea eax, [esp + 0x230]
push esi
push eax
mov byte [esp + 0x66c], 1
call fcn.00407b20
mov edx, dword [ebp + 8]
add esp, 0xc
cmp edx, 2
jge 0x401116
push 0xfffffffffffffff5
mov dword [esp + 0x230], 4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
jne 0x4010ee
or eax, 0xffffffff
jmp 0x401661
push esi
lea ecx, [esp + 0x14]
push ecx
push 0x20c
lea edx, [esp + 0x238]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
neg eax
sub eax, 1
jmp 0x401661
mov esi, dword [edi + 4]
mov eax, esi
lea ebx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x401120
sub eax, ebx
cmp eax, 2
je 0x401171
push 0xfffffffffffffff5
mov dword [esp + 0x230], 4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
je 0x4010e6
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x20c
lea edx, [esp + 0x238]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
neg eax
sbb eax, eax
neg eax
sub eax, 1
jmp 0x401661
cmp byte [esi], 0x2d
je 0x401183
lea eax, [esp + 0x22c]
push eax
jmp 0x40164e
movsx eax, byte [esi + 1]
add eax, 0xffffff9d
cmp eax, 0x15
ja case.0x40119a.102
movzx ecx, byte [eax + 0x4016b0]
jmp dword [ecx*4 + 0x401688]
cmp edx, 3
je 0x4011b2
lea edx, [esp + 0x22c]
jmp 0x40164d
mov eax, dword [edi + 8]
push eax
lea esi, [esp + 0x1c]
call fcn.00402760
test eax, eax
jne 0x401631
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x22c], ecx
lea edx, [esp + 0x22c]
push edx
jmp 0x401659
cmp edx, 5
jne 0x401176
mov ecx, dword [edi + 8]
mov edx, dword [edi + 0xc]
push ecx
mov ecx, dword [edi + 0x10]
push edx
lea edx, [esp + 0x20]
call fcn.004023c0
test eax, eax
jne 0x401631
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x22c]
mov dword [esp + 0x22c], eax
push ecx
jmp 0x401659
cmp edx, 3
jne 0x4011a6
mov eax, dword [edi + 8]
push eax
lea esi, [esp + 0x1c]
call fcn.00402830
jmp 0x4011bf
cmp edx, 3
jne 0x401176
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [edi + 8]
lea esi, [esp + 0x28]
call fcn.00402ea0
mov eax, dword [esp + 0x20]
test eax, eax
mov dword [esp + 0x22c], eax
jne 0x4011d2
mov eax, dword [esp + 0x1c]
mov ecx, 0x81
lea edi, [esp + 0x238]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x22c]
mov dword [esp + 0x234], 0x204
mov dword [esp + 0x230], eax
push ecx
jmp 0x401659
cmp edx, 3
je 0x40129c
lea eax, [esp + 0x22c]
push eax
jmp 0x40164e
mov ecx, dword [edi + 8]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00402900
test eax, eax
jne 0x401631
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x22c]
mov dword [esp + 0x22c], edx
push eax
jmp 0x401659
cmp edx, 3
je 0x4012db
lea ecx, [esp + 0x22c]
push ecx
jmp 0x40164e
mov ecx, dword [edi + 8]
lea edx, [esp + 0x18]
push edx
call fcn.00402b70
test eax, eax
jne 0x401631
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x22c]
mov dword [esp + 0x22c], eax
push ecx
jmp 0x401659
mov ecx, 4
cmp edx, ecx
jne 0x40137c
mov eax, dword [edi + 0xc]
mov al, byte [eax]
cmp al, 0x69
jne 0x40132e
mov edi, dword [edi + 8]
lea ecx, [esp + 0x18]
xor ebx, ebx
push ecx
call fcn.00402d00
jmp 0x4012a9
cmp al, 0x73
jne 0x401349
mov edi, dword [edi + 8]
lea ecx, [esp + 0x18]
mov ebx, 1
push ecx
call fcn.00402d00
jmp 0x4012a9
mov dword [esp + 0x22c], ecx
lea ecx, [esp + 0x22c]
push ecx
jmp 0x401659
cmp edx, 2
jne case.0x40119a.102
lea eax, [esp + 0x18]
push eax
call fcn.00403130
test eax, eax
jne 0x401631
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x22c]
mov dword [esp + 0x22c], ecx
push edx
jmp 0x401659
cmp edx, 3
jne 0x40128f
mov edx, dword [edi + 8]
test edx, edx
je 0x4012ce
push 0
lea ecx, [esp + 0x14]
call fcn.00401870
test eax, eax
jne 0x4013cb
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x22c]
mov dword [esp + 0x22c], edx
push eax
jmp 0x401659
mov esi, dword [edi + 8]
lea edx, [esp + 0x544]
mov eax, esi
sub edx, esi
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x4013e0
lea eax, [esp + 0x544]
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4013f6
mov ecx, dword [str.win98]
mov dx, word [0x40fb10]
mov dword [eax], ecx
mov cl, byte [0x40fb12]
lea edi, [esp + 0x544]
mov word [eax + 4], dx
mov byte [eax + 6], cl
add edi, 0xffffffff
mov al, byte [edi + 1]
add edi, 1
test al, al
jne 0x401426
mov dx, word [0x40fb14]
mov word [edi], dx
push esi
mov edx, str.win98
lea ecx, [esp + 0x14]
call fcn.00401870
test eax, eax
jne 0x401465
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x22c]
mov dword [esp + 0x22c], eax
push ecx
jmp 0x401659
xor eax, eax
jmp 0x401470
mov cl, byte [esp + eax + 0x544]
mov byte [esp + eax + 0x43c], cl
add eax, 1
test cl, cl
jne 0x401470
lea eax, [esp + 0x43c]
add eax, 0xffffffff
nop
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x401490
mov edx, dword [str.slusb.inf]
mov ecx, dword [0x40fb1c]
mov dword [eax], edx
mov dx, word [0x40fb20]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x43c]
push eax
push 0x6c
lea eax, [esp + 0x18]
call fcn.00401700
test eax, eax
jne 0x4014e5
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x22c]
mov dword [esp + 0x22c], ecx
push edx
jmp 0x401659
xor eax, eax
jmp 0x4014f0
mov cl, byte [esp + eax + 0x544]
mov byte [esp + eax + 0x43c], cl
add eax, 1
test cl, cl
jne 0x4014f0
lea eax, [esp + 0x43c]
add eax, 0xffffffff
nop
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x401510
mov ecx, dword [0x40fb2c]
mov edx, dword [0x40fb30]
mov dword [eax], ecx
mov cx, word [0x40fb34]
mov dword [eax + 4], edx
mov dl, byte [0x40fb36]
mov word [eax + 8], cx
mov byte [eax + 0xa], dl
lea eax, [esp + 0x43c]
push eax
push 0x6e
lea eax, [esp + 0x18]
call fcn.00401700
test eax, eax
je 0x4014cd
xor eax, eax
lea esp, [esp]
mov cl, byte [esp + eax + 0x544]
mov byte [esp + eax + 0x43c], cl
add eax, 1
test cl, cl
jne 0x401560
lea eax, [esp + 0x43c]
add eax, 0xffffffff
nop
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x401580
mov ecx, dword [0x40fb38]
mov edx, dword [0x40fb3c]
mov dword [eax], ecx
mov cx, word [0x40fb40]
mov dword [eax + 4], edx
lea edx, [esp + 0x43c]
push edx
mov word [eax + 8], cx
push 0x6f
lea eax, [esp + 0x18]
call fcn.00401700
test eax, eax
je 0x40144d
xor eax, eax
jmp 0x4015d0
mov cl, byte [esp + eax + 0x544]
mov byte [esp + eax + 0x43c], cl
add eax, 1
test cl, cl
jne 0x4015d0
lea eax, [esp + 0x43c]
add eax, 0xffffffff
nop
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4015f0
mov edx, dword [str.slusb.sys]
mov ecx, dword [0x40fb48]
mov dword [eax], edx
mov dx, word [0x40fb4c]
mov dword [eax + 4], ecx
mov word [eax + 8], dx
lea eax, [esp + 0x43c]
push eax
push 0x6d
lea eax, [esp + 0x18]
call fcn.00401700
test eax, eax
je 0x4014cd
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x22c]
mov dword [esp + 0x230], eax
push ecx
jmp 0x401659
lea edx, [esp + 0x22c]
push edx
mov dword [esp + 0x230], 4
call fcn.00401000
add esp, 4
mov ecx, dword [esp + 0x658]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x640]
xor ecx, esp
call fcn.004031ea
mov esp, ebp
pop ebp
ret