Function at 0x10022500
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10050f48
mov eax, dword fs:[0]
push eax
sub esp, 0x900
mov eax, dword [0x10063790]
xor eax, esp
mov dword [esp + 0x8f8], eax
push ebx
push esi
push edi
mov eax, dword [0x10063790]
xor eax, esp
push eax
lea eax, [esp + 0x910]
mov dword fs:[0], eax
mov esi, edx
push 0x104
mov ebx, ecx
push esi
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_IsBadStringPtrW]
test eax, eax
je 0x1002256a
mov dword [ebx + 4], 0x57
xor eax, eax
jmp 0x10023135
cmp dword [ebx + 0x38], 0xffffffff
jne 0x1002257e
mov dword [ebx + 4], 0x10000101
xor eax, eax
jmp 0x10023135
xor edi, edi
cmp dword [ebx + 0x40], edi
jne 0x1002258f
push ebx
call fcn.1001f140
test eax, eax
je 0x10022563
xor eax, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
lea eax, [esp + 0x20c]
push eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x38], edi
call fcn.100244c0
lea ecx, [esp + 0x1b4]
push ecx
mov dword [esp + 0x91c], edi
call fcn.10024810
push 0x206
lea edx, [esp + 0x2f2]
push edi
mov byte [esp + 0x920], 1
push edx
mov word [esp + 0x2f8], di
call fcn.1003d360
add esp, 0xc
push 0x206
lea eax, [esp + 0x4fa]
push edi
push eax
mov word [esp + 0x500], di
call fcn.1003d360
add esp, 0xc
push 0x10057090
lea ecx, [esp + 0x19c]
call fcn.10001930
push 0x10057090
lea ecx, [esp + 0x180]
mov byte [esp + 0x91c], 2
call fcn.10001930
push 0x206
lea ecx, [esp + 0x702]
push edi
mov byte [esp + 0x920], 3
push ecx
mov word [esp + 0x708], di
call fcn.1003d360
add esp, 0xc
push 0x10057090
lea ecx, [esp + 0x164]
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], 0xfeff
call fcn.10001930
push edi
push edi
push 2
push edi
push 2
push 0x40000000
push esi
mov byte [esp + 0x934], 4
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10022774
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 8
cmp dword [esp + 0x178], esi
mov dword [ebx + 4], eax
jb 0x100226dc
mov edx, dword [esp + 0x164]
push edx
call fcn.1003c1aa
add esp, 4
cmp dword [esp + 0x194], esi
mov ebx, 7
mov dword [esp + 0x178], ebx
mov dword [esp + 0x174], edi
mov word [esp + 0x164], di
jb 0x10022710
mov eax, dword [esp + 0x180]
push eax
call fcn.1003c1aa
add esp, 4
cmp dword [esp + 0x1b0], esi
mov dword [esp + 0x194], ebx
mov dword [esp + 0x190], edi
mov word [esp + 0x180], di
jb 0x1002273f
mov ecx, dword [esp + 0x19c]
push ecx
call fcn.1003c1aa
add esp, 4
lea ecx, [esp + 0x1b4]
mov dword [esp + 0x1b0], ebx
mov dword [esp + 0x1ac], edi
mov word [esp + 0x19c], di
call fcn.10024920
lea ecx, [esp + 0x20c]
call fcn.100245c0
xor eax, eax
jmp 0x10023135
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
lea edx, [esp + 0x24]
push edx
push 2
lea eax, [esp + 0x38]
push eax
push esi
call ebx
push str.CSP.DAT_v_4.0_r_n
lea ecx, [esp + 0x700]
push 0x104
push ecx
call fcn.1003e374
lea eax, [esp + 0x708]
add esp, 0xc
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x100227b0
sub eax, edx
push edi
sar eax, 1
lea edx, [esp + 0x24]
push edx
add eax, eax
push eax
lea ecx, [esp + 0x708]
push ecx
push esi
call ebx
push 0x1005ba58
lea edx, [esp + 0x700]
push 0x104
push edx
call fcn.1003e374
lea eax, [esp + 0x708]
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
add eax, 2
cmp dx, di
jne 0x100227f7
sub eax, ecx
push edi
sar eax, 1
lea ecx, [esp + 0x24]
push ecx
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x708]
push eax
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
mov dword [esp + 0x91c], 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x14]
mov eax, dword [ebx + 0x5c]
mov eax, dword [eax]
add ebx, 0x58
mov esi, ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], eax
mov edi, edi
cmp esi, edi
mov ecx, dword [ebx + 4]
mov dword [esp + 0x5c], ecx
je 0x1002285f
cmp esi, ebx
je 0x10022864
call fcn.1003c54f
mov edx, dword [esp + 0x5c]
cmp dword [esp + 0x1c], edx
je 0x10022e28
cmp esi, edi
jne 0x1002287b
call fcn.1003c54f
mov eax, dword [esp + 0x1c]
cmp eax, dword [esi + 4]
jne 0x10022889
call fcn.1003c54f
mov edi, dword [esp + 0x1c]
add edi, 8
lea esi, [esp + 0x20c]
call fcn.10024700
mov ecx, dword [esp + 0x244]
or ecx, dword [esp + 0x248]
je 0x10022e05
cmp dword [esp + 0x26c], 0
jne 0x10022e05
mov al, byte [esp + 0x24c]
cmp al, 5
je 0x100228e9
cmp al, 0xf
je 0x100228e9
cmp al, 0xdd
je 0x100228e9
cmp al, 0xde
je 0x100228e9
lea ecx, [esp + 0x294]
call fcn.100256c0
test eax, eax
jne 0x10022e05
mov edx, dword [esp + 0x218]
push edx
push str.PART_4.4X
lea eax, [esp + 0x2f4]
push 0x104
push eax
call fcn.1003cd26
mov ecx, dword [esp + 0x24]
add esp, 0x10
cmp dword [ecx + 0x44], 0
je 0x10022982
lea esi, [esp + 0x60]
lea eax, [esp + 0x20c]
call fcn.10003890
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x16c]
mov byte [esp + 0x924], 7
call fcn.10001cd0
mov ecx, esi
mov byte [esp + 0x918], 4
call fcn.10001970
cmp dword [esp + 0x178], 8
mov eax, dword [esp + 0x164]
jae 0x10022965
lea eax, [esp + 0x164]
mov edx, dword [esp + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push edx
push eax
push str.Partition_Id
lea eax, [esp + 0x2f8]
push eax
call ebx
jmp 0x10022988
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov ecx, dword [esp + 0x240]
mov edx, dword [esp + 0x23c]
push ecx
push edx
push str._I64u
lea eax, [esp + 0x500]
push 0x104
push eax
call fcn.1003cd26
mov edi, dword [esp + 0x24]
add esp, 0x14
push edi
lea ecx, [esp + 0x4f8]
push ecx
push str.Starting_Offset
lea edx, [esp + 0x2f8]
push edx
call ebx
mov eax, dword [esp + 0x248]
mov ecx, dword [esp + 0x244]
push eax
push ecx
push str._I64u
lea edx, [esp + 0x500]
push 0x104
push edx
call fcn.1003cd26
add esp, 0x14
push edi
lea eax, [esp + 0x4f8]
push eax
push str.Partition_Size
lea ecx, [esp + 0x2f8]
push ecx
call ebx
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x44], 0
je 0x10022a7b
lea esi, [esp + 0x60]
lea eax, [esp + 0x20c]
call fcn.100038c0
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x16c]
mov byte [esp + 0x924], 8
call fcn.10001cd0
mov ecx, esi
mov byte [esp + 0x918], 4
call fcn.10001970
cmp dword [esp + 0x178], 8
mov eax, dword [esp + 0x164]
jae 0x10022a6a
lea eax, [esp + 0x164]
push edi
push eax
push str.Partition_Type
lea edx, [esp + 0x2f8]
push edx
jmp 0x10022aba
cmp dword [eax + 0x48], 0
je 0x10022abc
movzx eax, byte [esp + 0x24c]
push eax
push str._2.2X
lea ecx, [esp + 0x4fc]
push 0x104
push ecx
call fcn.1003cd26
add esp, 0x10
push edi
lea edx, [esp + 0x4f8]
push edx
push str.Partition_Type
lea eax, [esp + 0x2f8]
push eax
call ebx
cmp dword [esp + 0x270], 0
mov eax, 0x1005bfec
jne 0x10022ad0
mov eax, 0x1005bff4
mov esi, dword [esp + 0x10]
push esi
push eax
push str.Primary
lea ecx, [esp + 0x2f8]
push ecx
call ebx
push esi
push 0x1005bffc
push str.Win_Type
lea edx, [esp + 0x2f8]
push edx
call ebx
lea edi, [esp + 0x294]
lea esi, [esp + 0x1b4]
call fcn.10024970
mov al, byte [esp + 0x24c]
cmp al, 5
je 0x10022d4e
cmp al, 0xf
je 0x10022d4e
cmp al, 0xdd
je 0x10022d4e
cmp al, 0xde
je 0x10022d4e
cmp dword [esp + 0x1fc], 0
je 0x10022cf6
mov edi, dword [esp + 0x10]
push edi
push 0x1005bfec
push str.Mounted_Volume
lea eax, [esp + 0x2f8]
push eax
call ebx
lea edx, [esp + 0x160]
mov ecx, esi
call fcn.100257a0
cmp dword [esp + 0x178], 8
mov eax, dword [esp + 0x164]
jae 0x10022b81
lea eax, [esp + 0x164]
push edi
push eax
push str.SystemID
lea ecx, [esp + 0x2f8]
push ecx
call ebx
lea ecx, [esp + 0x160]
lea esi, [esp + 0x1b4]
call fcn.100252c0
cmp dword [esp + 0x178], 8
mov eax, dword [esp + 0x164]
jae 0x10022bbd
lea eax, [esp + 0x164]
push edi
push eax
push str.VolumeName
lea edx, [esp + 0x2f8]
push edx
call ebx
lea ecx, [esp + 0x160]
lea esi, [esp + 0x1b4]
call fcn.100254c0
cmp dword [esp + 0x178], 8
mov eax, dword [esp + 0x164]
jae 0x10022bf9
lea eax, [esp + 0x164]
push edi
push eax
push str.FS_Type
lea eax, [esp + 0x2f8]
push eax
call ebx
lea ebx, [esp + 0x160]
lea ecx, [esp + 0x1b4]
call fcn.10026170
mov eax, dword [esp + 0x164]
mov esi, 8
cmp dword [esp + 0x178], esi
jae 0x10022c39
lea eax, [esp + 0x164]
push str.0.0.0.0
push eax
call fcn.1003c8ff
add esp, 8
test eax, eax
je 0x10022cbf
cmp dword [esp + 0x178], esi
mov eax, dword [esp + 0x164]
jae 0x10022c62
lea eax, [esp + 0x164]
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push edi
push eax
push str.Version
lea ecx, [esp + 0x2f8]
push ecx
call esi
lea ecx, [esp + 0x1b4]
call fcn.10026ad0
push eax
push 0x1005bbbc
lea edx, [esp + 0x4fc]
push 0x104
push edx
call fcn.1003cd26
add esp, 0x10
push edi
lea eax, [esp + 0x4f8]
push eax
push str.Windows_Version
lea ecx, [esp + 0x2f8]
push ecx
call esi
mov ebx, esi
jmp 0x10022da6
mov esi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push edi
push str.0.0.0.0
push str.Version
lea edx, [esp + 0x2f8]
push edx
call esi
push edi
push 0x1005c058
push str.Windows_Version
lea eax, [esp + 0x2f8]
push eax
call esi
mov ebx, esi
jmp 0x10022da6
mov esi, dword [esp + 0x10]
push esi
push str.FAT32
push str.FS_Type
lea ecx, [esp + 0x2f8]
push ecx
call ebx
push esi
push 0x1005bff4
push str.Mounted_Volume
lea edx, [esp + 0x2f8]
push edx
call ebx
push esi
push str.0.0.0.0
push str.Version
lea eax, [esp + 0x2f8]
push eax
call ebx
push esi
push 0x1005c058
push str.Windows_Version
lea ecx, [esp + 0x2f8]
push ecx
jmp 0x10022da4
mov esi, dword [esp + 0x10]
push esi
push str.FAT32
push str.FS_Type
lea edx, [esp + 0x2f8]
push edx
call ebx
push esi
push 0x1005bff4
push str.Mounted_Volume
lea eax, [esp + 0x2f8]
push eax
call ebx
push esi
push str.0.0.0.0
push str.Version
lea ecx, [esp + 0x2f8]
push ecx
call ebx
push esi
push 0x1005c058
push str.Windows_Version
lea edx, [esp + 0x2f8]
push edx
call ebx
mov esi, dword [esp + 0x10]
push esi
push str.always
push str.Create
lea eax, [esp + 0x2f8]
push eax
call ebx
mov al, byte [esp + 0x24c]
cmp al, 0xdd
je 0x10022de3
cmp al, 0xde
je 0x10022de3
push esi
push str.always
push str.Restore
lea ecx, [esp + 0x2f8]
push ecx
jmp 0x10022df6
push esi
push str.on_creation
push str.Restore
lea edx, [esp + 0x2f8]
push edx
call ebx
push esi
push 0
push 0
push 0
call ebx
mov ebx, dword [esp + 0x30]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
cmp esi, dword [eax + 4]
jne 0x10022e17
call fcn.1003c54f
mov ecx, dword [esi]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x1c], ecx
xor edi, edi
jmp 0x10022850
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x7c]
call fcn.10020020
mov edi, eax
lea esi, [esp + 0x20c]
mov byte [esp + 0x918], 9
call fcn.10024700
lea ecx, [esp + 0x7c]
mov byte [esp + 0x918], 4
call fcn.100245c0
mov eax, dword [esp + 0x244]
mov ecx, dword [esp + 0x248]
mov edx, eax
or edx, ecx
je 0x10022f39
push ecx
push eax
push str._I64u
lea eax, [esp + 0x500]
push 0x104
push eax
call fcn.1003cd26
mov esi, dword [esp + 0x24]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
add esp, 0x14
push esi
lea ecx, [esp + 0x4f8]
push ecx
push str.Recovery_Partition_Size
push str.General
call ebx
mov edx, dword [esp + 0x240]
mov eax, dword [esp + 0x23c]
push edx
push eax
push str._I64u
lea ecx, [esp + 0x500]
push 0x104
push ecx
call fcn.1003cd26
add esp, 0x14
push esi
lea edx, [esp + 0x4f8]
push edx
push str.Recovery_Partition_Start
push str.General
call ebx
lea edi, [esp + 0x294]
lea esi, [esp + 0x1b4]
call fcn.10024970
lea ecx, [esp + 0x160]
call fcn.100252c0
cmp dword [esp + 0x178], 8
mov eax, dword [esp + 0x164]
jae 0x10022f25
lea eax, [esp + 0x164]
mov ecx, dword [esp + 0x10]
push ecx
push eax
push str.VolumeName
push str.General
call ebx
jmp 0x10022f3f
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov esi, dword [esp + 0x14]
mov edx, dword [esi + 0xc]
mov eax, dword [esi + 8]
push edx
push eax
push str._I64u
lea ecx, [esp + 0x500]
push 0x104
push ecx
call fcn.1003cd26
mov edi, dword [esp + 0x24]
add esp, 0x14
push edi
lea edx, [esp + 0x4f8]
push edx
push str.Disk_Size
push str.General
call ebx
mov eax, dword [esi]
push eax
push 0x1005b6bc
lea ecx, [esp + 0x4fc]
push 0x104
push ecx
call fcn.1003cd26
add esp, 0x10
push edi
lea edx, [esp + 0x4f8]
push edx
push str.Disk_Num
push str.General
call ebx
mov eax, dword [esi]
push eax
push 0x1005b6bc
lea ecx, [esp + 0x4fc]
push 0x104
push ecx
call fcn.1003cd26
add esp, 0x10
cmp dword [esi + 0x44], 0
je 0x10022fe5
push edi
push 0x1005c190
push str.Disk_Type
push str.General
call ebx
cmp dword [esi + 0x48], 0
je 0x10022ffd
push edi
push 0x1005c1ac
push str.Disk_Type
push str.General
call ebx
xor esi, esi
push esi
call fcn.1003d320
mov dword [esp + 0x2c], edx
add esp, 4
lea edx, [esp + 0x24]
mov dword [esp + 0x24], eax
push edx
lea eax, [esp + 0x38]
push eax
call fcn.1003d037
add esp, 8
test eax, eax
jne 0x1002307b
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x54]
push ecx
add edx, 1
push edx
add eax, 0x76c
push eax
push str._.4d__.2d__.2d__.2d:_.2d:_.2d
lea ecx, [esp + 0x510]
push 0x104
push ecx
call fcn.1003cd26
add esp, 0x24
push edi
lea edx, [esp + 0x4f8]
push edx
push str.Date
push str.General
call ebx
push edi
push esi
push esi
push esi
call ebx
mov edi, 8
cmp dword [esp + 0x178], edi
jb 0x1002309f
mov eax, dword [esp + 0x164]
push eax
call fcn.1003c1aa
add esp, 4
cmp dword [esp + 0x194], edi
mov ebx, 7
mov dword [esp + 0x178], ebx
mov dword [esp + 0x174], esi
mov word [esp + 0x164], si
jb 0x100230d3
mov ecx, dword [esp + 0x180]
push ecx
call fcn.1003c1aa
add esp, 4
cmp dword [esp + 0x1b0], edi
mov dword [esp + 0x194], ebx
mov dword [esp + 0x190], esi
mov word [esp + 0x180], si
jb 0x10023102
mov edx, dword [esp + 0x19c]
push edx
call fcn.1003c1aa
add esp, 4
lea ecx, [esp + 0x1b4]
mov dword [esp + 0x1b0], ebx
mov dword [esp + 0x1ac], esi
mov word [esp + 0x19c], si
call fcn.10024920
lea ecx, [esp + 0x20c]
call fcn.100245c0
mov eax, 1
mov ecx, dword [esp + 0x910]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x8f8]
xor ecx, esp
call fcn.1003c13d
mov esp, ebp
pop ebp
ret