Function at 0x422c81
Capabilities:
Clear file content
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x644
mov eax, dword [0x4261d4]
xor eax, esp
mov dword [esp + 0x640], eax
and dword [esp + 0x1c], 0
lea eax, [esp + 4]
push ebx
push esi
push edi
push 0
mov esi, ecx
mov dword [esp + 0x30], edx
push eax
mov ecx, 0xfe00
or ebx, 0xffffffff
call fcn.00414283
mov dword [esp + 0x18], eax
test eax, eax
je 0x4231be
cmp dword [0x4260d0], 0
je 0x422d02
mov edi, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push 1
push ecx
mov ecx, edi
mov dword [esp + 0x2c], edi
call fcn.00414283
mov dword [esp + 0x28], eax
test eax, eax
je 0x4231be
cmp edi, dword [esp + 0x1c]
jb 0x422d0a
mov eax, dword [esp + 0x1c]
jmp 0x422d06
mov eax, dword [esp + 0x10]
mov dword [esp + 0x24], eax
mov esi, dword [esi + 0x20]
mov ecx, dword [esi]
call fcn.0040db99
test eax, eax
jne 0x422d26
mov esi, dword [esi + 0x20]
test esi, esi
jne 0x422d0d
xor eax, eax
jmp 0x4231c1
mov ecx, dword [esi]
lea eax, [esp + 0x1c]
push eax
push dword [esi + 0x18]
push 0x21
pop edx
call fcn.00408792
mov edi, dword [esp + 0x1c]
and dword [esi + 0x1c], 0xffff3fff
mov eax, dword [esi + 0x1c]
test al, 4
je 0x422d53
and eax, 0xfffffffb
or eax, 2
mov dword [esi + 0x1c], eax
cmp dword [0x426124], 0
jne 0x4231b7
push ecx
lea edx, [esp + 0x444]
mov ecx, esi
call fcn.004141aa
cmp eax, 1
je 0x4231b7
push dword [esi + 4]
push 0x406a18
call fcn.00406992
mov edx, dword [esp + 0x34]
lea eax, [esp + 0x38]
pop ecx
pop ecx
push 0
push ecx
push eax
mov ecx, esi
call fcn.00413912
cmp eax, 1
je 0x4231b7
cmp word [esp + 0x30], 0
je 0x423116
mov ecx, dword [esi + 4]
lea edx, [esp + 0x30]
call fcn.004232f8
test eax, eax
je 0x422ddc
push dword [esp + 0x24]
mov ecx, dword [esi + 4]
mov edx, esi
push dword [esp + 0x1c]
call fcn.004231db
mov ebx, eax
mov dword [esp + 0x14], ebx
jmp 0x422f9b
mov edx, dword [esi + 0x1c]
push ecx
and edx, 0x800
push ecx
mov ecx, dword [esi + 4]
shl edx, 0xa
call fcn.00413828
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x4231ae
mov ecx, eax
call fcn.004048d4
test eax, eax
je 0x422e15
mov eax, 0x80
mov dword [esp + 0x24], eax
jmp 0x422e19
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x30]
push ecx
push ebx
mov ebx, dword [esp + 0x18]
lea ecx, [esp + 0x28]
push esi
push ecx
push eax
mov ecx, ebx
call fcn.00413769
cmp dword [0x4260a4], 0
mov dword [esp + 0x1c], eax
jne 0x423189
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_GetFileAttributesW]
test al, 2
jne 0x422e7e
lea ecx, [esp + 0x30]
call fcn.004146fb
mov ebx, eax
mov dword [esp + 0x14], ebx
cmp ebx, 0xffffffff
je 0x4231a1
push ebx
call dword [sym.imp.msvcrt.dll__get_osfhandle]
pop ecx
push eax
call dword [sym.imp.api_ms_win_core_file_l1_2_1.dll_SetEndOfFile]
jmp 0x422e92
push ecx
xor edx, edx
push ecx
inc edx
lea ecx, [esp + 0x38]
call fcn.00413828
mov ebx, eax
mov dword [esp + 0x14], ebx
cmp ebx, 0xffffffff
je 0x4231a1
cmp dword [0x42609c], 0
je 0x422f0a
cmp dword [esp + 0x20], 0
jle 0x422efd
push dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x28]
mov ecx, ebx
call fcn.00423432
cmp dword [0x4260d0], 0
je 0x422efd
mov ecx, ebx
call fcn.004048d4
test eax, eax
jne 0x422efd
push dword [esp + 0x28]
lea edx, [esp + 0x34]
push dword [esp + 0x1c]
lea ecx, [esp + 0x1c]
push dword [esp + 0x28]
call fcn.00422b1d
cmp eax, 1
je 0x42313a
mov ebx, dword [esp + 0x14]
cmp dword [0x42609c], 0
jne 0x422f8b
mov eax, dword [esp + 0x1c]
cmp eax, 1
jne 0x422f8b
push dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x28]
mov ecx, ebx
call fcn.00423432
cmp dword [0x4260d0], 0
je 0x422f65
mov ecx, ebx
call fcn.004048d4
test eax, eax
jne 0x422f65
push dword [esp + 0x28]
lea edx, [esp + 0x34]
push dword [esp + 0x1c]
lea ecx, [esp + 0x1c]
push dword [esp + 0x28]
call fcn.00422b1d
cmp eax, 1
je 0x42315d
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x10]
push eax
push ebx
push esi
lea eax, [esp + 0x2c]
push eax
push dword [esp + 0x34]
call fcn.00413769
cmp dword [0x42609c], 0
je 0x422f0e
mov ecx, dword [esp + 0x10]
and dword [0x42609c], 0
call fcn.004049f8
and dword [0x42615c], 0
mov ecx, dword [esi + 0x20]
jmp 0x4230f2
mov eax, dword [ecx + 0x1c]
test al, 4
je 0x422fba
and eax, 0xfffffffb
or eax, 2
mov dword [ecx + 0x1c], eax
push dword [esi + 4]
push dword [ecx]
lea ecx, [esp + 0x240]
call fcn.00413566
test eax, eax
je 0x422fd9
push 0
push eax
call fcn.0040bd74
jmp 0x422feb
lea eax, [esp + 0x238]
push eax
push 0x406a18
call fcn.00406992
pop ecx
pop ecx
lea ecx, [esp + 0x238]
call fcn.0040db99
test eax, eax
je 0x4230eb
lea edx, [esp + 0x30]
lea ecx, [esp + 0x238]
call fcn.004232f8
test eax, eax
je 0x423028
push 0
push 0x2340
call fcn.0040bd74
pop ecx
pop ecx
jmp 0x4230eb
push ecx
push ecx
xor edx, edx
lea ecx, [esp + 0x240]
call fcn.00413828
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x423189
mov ecx, eax
call fcn.004048d4
test eax, eax
je 0x4230ce
mov eax, 0x80
mov dword [esp + 0x24], eax
jmp 0x4230d2
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x30]
push ecx
push ebx
push dword [esp + 0x24]
lea ecx, [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x20]
push eax
call fcn.00413769
test eax, eax
je 0x4230db
push dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x34]
push eax
push dword [esp + 0x28]
mov ecx, ebx
call fcn.00423432
cmp dword [0x4260d0], 0
je 0x4230ce
mov ecx, ebx
call fcn.004048d4
test eax, eax
jne 0x4230ce
push dword [esp + 0x28]
lea edx, [esp + 0x34]
push dword [esp + 0x1c]
lea ecx, [esp + 0x1c]
push dword [esp + 0x28]
call fcn.00422b1d
cmp eax, 1
je 0x423173
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
cmp dword [0x42609c], 0
je 0x42305b
mov ecx, dword [esp + 0x10]
and dword [0x42609c], 0
call fcn.004049f8
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 0x20]
mov dword [esp + 0x1c], ecx
test ecx, ecx
jne 0x422faa
mov edx, dword [esp + 0x2c]
mov ecx, esi
push 0
push ebx
call fcn.004140d7
mov dword [0x426154], 1
mov edx, dword [esi + 0x18]
mov ecx, fcn.00402fb0
push edi
push 0x21
call fcn.0040b003
test al, al
jne 0x422d3c
mov ecx, edi
call fcn.00402fd4
jmp 0x422d1f
mov ecx, edi
call fcn.00402fd4
mov ecx, dword [esp + 0x10]
call fcn.004049f8
mov ecx, dword [esp + 0x14]
call fcn.004049f8
xor edx, edx
xor ecx, ecx
inc edx
call fcn.00422c0d
mov ecx, edi
call fcn.00402fd4
mov ecx, dword [esp + 0x10]
call fcn.004049f8
mov ecx, dword [esp + 0x14]
jmp 0x42314e
mov ecx, edi
call fcn.00402fd4
mov ecx, dword [esp + 0x10]
call fcn.004049f8
mov ecx, dword [esp + 0x14]
jmp 0x42314e
mov ecx, edi
call fcn.00402fd4
mov ecx, ebx
call fcn.004049f8
push 0x6e
pop ecx
call fcn.00416160
jmp 0x423153
mov ecx, edi
call fcn.00402fd4
mov ecx, dword [esp + 0x10]
jmp 0x423192
mov ecx, edi
call fcn.00402fd4
jmp 0x423197
mov ecx, edi
call fcn.00402fd4
xor eax, eax
inc eax
mov ecx, dword [esp + 0x64c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401200
mov esp, ebp
pop ebp
ret