Function at 0x1022c56
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0x488
push 0x1002dd8
call fcn.01032098
mov eax, dword [reloc.msvcrt.dll___p__fmode]
mov dword [ebp - 0x1c], eax
mov ebx, dword [ebp + 8]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], ebx
mov dword [ebp - reloc.msvcrt.dll___p__fmode], 0x18
mov edi, fcn.010228fa
mov dword [ebp - reloc.msvcrt.dll___p__fmode], edi
mov esi, 0x1021f7c
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
mov edx, 0x1022092
mov dword [ebp - reloc.msvcrt.dll___p__fmode], edx
mov ecx, 0x1022198
mov dword [ebp - reloc.msvcrt.dll___p__fmode], ecx
mov eax, 0x1022346
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov dword [ebp - reloc.msvcrt.dll___p__fmode], 0x20
mov dword [ebp - reloc.msvcrt.dll___p__fmode], edi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
mov dword [ebp - reloc.msvcrt.dll___p__fmode], edx
mov dword [ebp - reloc.msvcrt.dll___p__fmode], ecx
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov dword [ebp - 0x474], fcn.010226f3
mov dword [ebp - 0x470], fcn.01021f1c
and dword [ebp - reloc.msvcrt.dll___p__fmode], 0
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
cmp eax, dword [ebx + 0x30]
jae 0x1023269
and word [ebp - 0x41c], 0
push 0x7f
pop ecx
xor eax, eax
lea edi, reloc.msvcrt.dll___p__fmode
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
and word [ebp - 0x21c], 0
push 0x7f
pop ecx
xor eax, eax
lea edi, reloc.msvcrt.dll___p__fmode
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x668
call fcn.01035a36
mov esi, eax
mov dword [ebp - reloc.msvcrt.dll___p__fmode], esi
test esi, esi
je 0x1023152
mov ecx, 0x19a
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
lea eax, reloc.msvcrt.dll___p__fmode
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
mov dword [eax], eax
mov edi, dword [ebp - reloc.msvcrt.dll___p__fmode]
lea edi, [edi + edi*4]
shl edi, 2
mov eax, dword [ebx + 0x2c]
mov eax, dword [edi + eax]
test eax, eax
jne 0x1022b75
mov eax, 0x1001818
push 0x104
push eax
lea eax, [esi + 0x28]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
and word [esi + 0x22e], 0
mov eax, dword [ebx + 0x2c]
mov eax, dword [edi + eax + 4]
test eax, eax
jne 0x1022ba0
mov eax, 0x1001818
lea ecx, reloc.msvcrt.dll___p__fmode
push 0x104
push eax
push ecx
call dword [sym.imp.msvcrt.dll_wcsncpy]
add esp, 0xc
and word [esi + 0x436], 0
mov eax, dword [ebx + 0x2c]
mov eax, dword [edi + eax + 8]
test eax, eax
jne 0x1022bce
mov eax, 0x1001818
push 0x104
push eax
lea eax, reloc.msvcrt.dll___p__fmode
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
xor eax, eax
mov word [esi + 0x63e], ax
lea ecx, reloc.msvcrt.dll___p__fmode
push ecx
lea ecx, reloc.msvcrt.dll___p__fmode
push ecx
push eax
push eax
lea eax, reloc.msvcrt.dll___p__fmode
push eax
call dword [sym.imp.msvcrt.dll__wsplitpath]
push reloc.WINSPOOL.DRV_DocumentPropertiesW
lea eax, reloc.msvcrt.dll___p__fmode
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 0x28
test eax, eax
jne 0x1022c42
push 0x10017fc
lea eax, reloc.msvcrt.dll___p__fmode
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1022c42
mov dword [esi + reloc.msvcrt.dll___p__fmode], 1
and dword [ebp - 4], 0
mov eax, dword [ebx + 0x2c]
push dword [edi + eax + 4]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
test eax, eax
jne 0x1022c7c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov dword [esi + 0xc], 4
mov dword [esi + 0x10], eax
or dword [ebp - 4], 0xffffffff
jmp 0x1023152
or dword [ebp - 4], reloc.msvcrt.dll___p__fmode
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov dword [esi + 8], eax
lea eax, [esi + 0x14]
mov dword [eax], 0x14
push eax
mov eax, dword [ebx + 0x2c]
push dword [edi + eax + 4]
call fcn.01028d8f
push reloc.WINSPOOL.DRV_DocumentPropertiesW
push dword [ebp - 0x424]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
call edi
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
push reloc.WINSPOOL.DRV_DocumentPropertiesW
push dword [ebp - 0x424]
call edi
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
push reloc.WINSPOOL.DRV_DocumentPropertiesW
push dword [ebp - 0x424]
call edi
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
push reloc.WINSPOOL.DRV_DocumentPropertiesW
push dword [ebp - 0x424]
call edi
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
push reloc.WINSPOOL.DRV_DocumentPropertiesW
push dword [ebp - 0x424]
call edi
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
cmp dword [esi + reloc.msvcrt.dll___p__fmode], 0
je 0x102310c
xor edi, edi
cmp dword [esi + reloc.msvcrt.dll___p__fmode], edi
je 0x102310c
cmp dword [esi + reloc.msvcrt.dll___p__fmode], edi
je 0x102310c
cmp eax, edi
je 0x102310c
cmp dword [esi + reloc.msvcrt.dll___p__fmode], edi
je 0x102310c
push reloc.WINSPOOL.DRV_DocumentPropertiesW
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
cmp dword [esi + reloc.msvcrt.dll___p__fmode], edi
je 0x1022d66
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
jmp 0x1022d77
push 0x200000
push 0x19000
push edi
call dword [sym.imp.KERNEL32.dll_HeapCreate]
mov dword [esi + reloc.msvcrt.dll___p__fmode], eax
cmp eax, edi
jne 0x1022d93
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xc], 1
jmp 0x1022e80
mov eax, dword [esi + reloc.msvcrt.dll___p__fmode]
cmp eax, edi
je 0x1022e09
mov dword [ebp - 4], 1
push 0x100b26d
push 0x102cdd1
push 0x102d41a
push 0x102d213
push 0x102c2ad
call eax
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
or dword [ebp - 4], 0xffffffff
jmp 0x1022e03
xor edi, edi
cmp eax, edi
jl 0x1022e79
mov dword [ebp - 4], 2
cmp dword [esi + reloc.msvcrt.dll___p__fmode], edi
lea eax, reloc.msvcrt.dll___p__fmode
jne 0x1022e24
lea eax, reloc.msvcrt.dll___p__fmode
push eax
push dword [esi + 0x640]
call dword [esi + 0x648]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
or dword [ebp - 4], 0xffffffff
jmp 0x1022e6f
test eax, eax
jne 0x1022e88
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xc], 6
mov dword [esi + 0x10], eax
jmp 0x1023152
xor ecx, ecx
mov dword [ebp - reloc.msvcrt.dll___p__fmode], ecx
mov edi, dword [ebp - reloc.msvcrt.dll___p__fmode]
lea edi, [edi + edi*4]
shl edi, 2
mov dword [ebp - reloc.msvcrt.dll___p__fmode], edi
mov eax, dword [ebx + 0x2c]
add eax, edi
cmp dword [eax + 0xc], ecx
jbe 0x102305e
mov dword [ebp - reloc.msvcrt.dll___p__fmode], ecx
and dword [ebp - reloc.msvcrt.dll___p__fmode], 0
push 0x1002cf0
mov eax, dword [eax + 0x10]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
push dword [eax + ecx + 8]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1022ee9
call fcn.01036a72
cmp eax, 1
je 0x102303b
push 0x38
call fcn.01035a36
mov ebx, eax
test ebx, ebx
je 0x1023071
push reloc.ADVAPI32.dll_RevertToSelf
pop ecx
xor eax, eax
mov edi, ebx
rep stosd dword es:[edi], eax
mov dword [ebx + 0x34], esi
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov ecx, dword [eax + 0x2c]
mov edx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov edi, dword [edx + ecx + 0x10]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov edi, dword [edi + ecx + 0x10]
mov dword [ebx + 0x20], edi
mov edi, dword [eax + 0x2c]
mov edi, dword [edx + edi + 0x10]
cmp dword [ecx + edi], 0
je 0x1022f3f
mov eax, dword [eax + 0x2c]
mov eax, dword [edx + eax + 0x10]
mov ecx, dword [ecx + eax]
jmp 0x1022f44
mov ecx, 0x1001818
push ecx
call fcn.01035adb
mov dword [ebx + 0x28], eax
test eax, eax
je 0x102308f
mov edi, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov eax, dword [edi + 0x2c]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov eax, dword [ecx + eax + 0x10]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov eax, dword [eax + ecx + 4]
test eax, eax
jne 0x1022f7b
mov eax, 0x1001818
push eax
call fcn.01035adb
mov dword [ebx + 0x24], eax
test eax, eax
je 0x102308f
mov eax, dword [edi + 0x2c]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov eax, dword [ecx + eax + 0x10]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov eax, dword [eax + ecx + 0xc]
test eax, eax
jne 0x1022fac
mov eax, 0x1001818
push eax
call fcn.01035adb
mov dword [ebx + 0x2c], eax
test eax, eax
je 0x102308f
lea eax, [ebx + 0x10]
push eax
mov eax, dword [edi + 0x2c]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov eax, dword [ecx + eax + 0x10]
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
push dword [eax + ecx + 8]
call dword [sym.imp.ole32.dll_IIDFromString]
test eax, eax
jne 0x1023086
push dword [ebx + 0x24]
call fcn.01035b7f
mov edi, eax
mov dword [ebp - reloc.msvcrt.dll___p__fmode], edi
test edi, edi
je 0x102308f
push edi
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebx + 0x30], eax
test eax, eax
je 0x102309e
push edi
call fcn.01035abf
lea eax, reloc.msvcrt.dll___p__fmode
mov ecx, dword [eax + 4]
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ecx], ebx
mov dword [eax + 4], ebx
mov ebx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov edi, dword [ebp - reloc.msvcrt.dll___p__fmode]
inc dword [ebp - reloc.msvcrt.dll___p__fmode]
add dword [ebp - reloc.msvcrt.dll___p__fmode], 0x14
mov eax, dword [ebx + 0x2c]
add eax, edi
mov ecx, dword [ebp - reloc.msvcrt.dll___p__fmode]
cmp ecx, dword [eax + 0xc]
jb 0x1022eb6
xor ecx, ecx
mov dword [esi + 0xc], ecx
mov dword [esi + 0x10], ecx
lea ecx, reloc.msvcrt.dll___p__fmode
mov eax, dword [ecx]
jmp 0x1023103
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xc], 1
mov dword [esi + 0x10], eax
jmp 0x102314c
mov dword [esi + 0xc], 2
jmp 0x10230ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xc], 1
jmp 0x10230ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xc], 5
mov dword [esi + 0x10], eax
push dword [ebx + 0x28]
call fcn.01035abf
push dword [ebx + 0x24]
call fcn.01035abf
push dword [ebx + 0x2c]
call fcn.01035abf
push ebx
call fcn.01035abf
push dword [ebp - 0x444]
call fcn.01035abf
jmp 0x102314c
mov edx, eax
mov eax, dword [eax]
mov edi, dword [reloc.msvcrt.dll___p__fmode]
lea ecx, [edx + 8]
mov dword [ecx], reloc.msvcrt.dll___p__fmode
mov dword [edx + 0xc], edi
mov dword [edi], ecx
mov dword [reloc.msvcrt.dll___p__fmode], ecx
inc dword [reloc.msvcrt.dll___p__fmode]
lea ecx, reloc.msvcrt.dll___p__fmode
cmp eax, ecx
jne 0x10230d9
jmp 0x1023244
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xc], 5
jmp 0x1022e80
mov ebx, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
lea eax, [eax + eax*4]
mov ecx, dword [ebx + 0x2c]
lea eax, [ecx + eax*4]
push dword [eax + 4]
push dword [eax]
push 0xc0007d24
push 2
push 1
push 1
call fcn.01034ce2
add esp, 0x18
test esi, esi
je 0x102325e
mov eax, dword [esi + 8]
test eax, eax
je 0x10231c4
mov dword [ebp - 4], 3
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
or dword [ebp - 4], 0xffffffff
jmp 0x10231c0
and dword [esi + 8], 0
lea edi, reloc.msvcrt.dll___p__fmode
mov eax, dword [edi]
test eax, eax
je 0x10231e3
cmp dword [esi + reloc.msvcrt.dll___p__fmode], 0
jne 0x10231e3
push eax
call dword [sym.imp.KERNEL32.dll_HeapDestroy]
and dword [edi], 0
lea edi, reloc.msvcrt.dll___p__fmode
mov eax, dword [edi]
cmp eax, edi
je 0x102323c
jmp 0x10231f7
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], eax
mov ecx, dword [eax]
mov dword [ebp - reloc.msvcrt.dll___p__fmode], ecx
push dword [eax + 0x28]
call fcn.01035abf
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
push dword [eax + 0x24]
call fcn.01035abf
mov eax, dword [ebp - reloc.msvcrt.dll___p__fmode]
push dword [eax + 0x2c]
call fcn.01035abf
push dword [ebp - 0x438]
call fcn.01035abf
cmp dword [ebp - reloc.msvcrt.dll___p__fmode], edi
jne 0x10231f1
mov dword [esi + reloc.msvcrt.dll___p__fmode], edi
mov dword [edi], edi
test esi, esi
je 0x102325e
mov eax, dword [reloc.msvcrt.dll___p__fmode]
mov dword [esi], reloc.msvcrt.dll___p__fmode
mov dword [esi + 4], eax
mov dword [eax], esi
mov dword [reloc.msvcrt.dll___p__fmode], esi
inc dword [ebp - reloc.msvcrt.dll___p__fmode]
jmp 0x1022aea
call fcn.0102241b
xor eax, eax
inc eax
mov ecx, dword [ebp - 0x1c]
call fcn.01031d91
call fcn.010320d3
ret 4