Function at 0x1038cca
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
xor ebx, ebx
or dword [ebp - 0x14], 0xffffffff
push esi
push edi
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], ebx
mov eax, dword [0x1049104]
mov edi, 0x1049104
mov esi, 0x102413c
cmp eax, edi
je 0x1038d11
test byte [eax + 0x1c], 2
je 0x1038d11
push dword [ebp + 0x1c]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
push 0x1a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010325a5
mov ecx, dword [ebp + 8]
cmp ecx, ebx
je 0x103917a
cmp dword [ecx], 0x6060
jne 0x103917a
mov eax, dword [ebp + 0x14]
dec eax
je 0x1038d65
push 0x7c
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1039175
test byte [eax + 0x1c], 1
je 0x103914e
push dword [ebp + 0x14]
push 0x7c
push esi
push 0x1e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034bea
jmp 0x1039149
push 0xc
pop ebx
cmp dword [ebp + 0x1c], ebx
jae 0x1038d99
push 0x7a
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp + 0x20]
mov dword [eax], ebx
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1039175
test byte [eax + 0x1c], 1
je 0x103914e
push ebx
push 0x7a
push esi
push 0x1c
jmp 0x1038d55
mov ebx, dword [ebp + 0x18]
test ebx, ebx
jne 0x1038dd4
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1039175
test byte [eax + 0x1c], 1
je 0x103914e
push 0x57
push esi
push 0x1d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245cc
jmp 0x1039149
or dword [ebx + 4], 0xffffffff
xor eax, eax
inc eax
mov dword [ebx], eax
mov dword [ebx + 8], eax
mov eax, dword [ecx + 4]
cmp eax, dword [0x10491bc]
jne 0x1038e52
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038e0e
test byte [eax + 0x1c], 2
je 0x1038e0e
push dword [ebp + 0x10]
push esi
push 0x1f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245cc
mov ecx, dword [ebp + 8]
push dword [ebp + 0x10]
mov eax, dword [0x10491bc]
push dword [ecx + 8]
call dword [eax + 0x154]
mov ebx, eax
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038e4b
test byte [eax + 0x1c], 2
je 0x1038e4b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1049104]
push ebx
push esi
push 0x20
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034bea
mov eax, ebx
jmp 0x10391a4
cmp dword [ecx + 0x1c], 0xffffffff
jne 0x1038e83
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x10391a2
test byte [eax + 0x1c], 1
je 0x10391a2
push 6
push 0
push esi
push 0x21
jmp 0x1039197
push 0x40000
call sym.spoolsv.exe_PrvDllAllocSplMem
mov dword [ebp + 0x14], eax
test eax, eax
jne 0x1038ecd
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1039127
test byte [eax + 0x1c], 1
je 0x1039127
push 0x40000
push 8
push esi
push 0x22
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034bea
jmp 0x1039122
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038ef4
test byte [eax + 0x1c], 2
je 0x1038ef4
push esi
push 0x23
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245a6
mov eax, dword [0x1049104]
jmp 0x1038ef4
mov ebx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
mov ecx, 0x40000
mov dword [ebp + 0x1c], edx
cmp edx, ecx
jb 0x1038f06
mov dword [ebp + 0x1c], ecx
cmp dword [ebp + 0x1c], 0
je 0x10390be
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x1c]
mov eax, dword [ebp + 8]
push dword [ebp + 0x14]
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10390b9
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038f5b
test byte [eax + 0x1c], 2
je 0x1038f5b
push dword [ebp - 4]
push dword [ebp + 0x1c]
push dword [ebp + 0x10]
push esi
push 0x24
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010325a5
mov eax, dword [0x1049104]
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x1039044
cmp dword [ebp + 0x10], ecx
jb 0x103909f
cmp eax, edi
je 0x1038f99
test byte [eax + 0x1c], 2
je 0x1038f99
mov edx, dword [ebp + 0x10]
push ecx
push dword [ebp + 0x10]
sub edx, ecx
push edx
push esi
push 0x26
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010325a5
mov ecx, dword [ebp - 4]
mov eax, dword [0x1049104]
sub dword [ebp + 0x10], ecx
cmp eax, edi
je 0x1038fbc
test byte [eax + 0x1c], 2
je 0x1038fbc
push esi
push 0x28
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245a6
mov ecx, dword [ebp - 4]
mov eax, dword [0x1049104]
xor ebx, ebx
test ecx, ecx
jbe 0x1039019
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
sub ecx, ebx
lea edx, [ebp - 0x10]
push edx
push ecx
mov ecx, dword [ebp + 0x14]
add ecx, ebx
push ecx
mov ecx, dword [ebp + 8]
push dword [ecx + 8]
call dword [eax + 0x64]
test eax, eax
je 0x1039069
mov eax, dword [0x1049104]
cmp eax, edi
je 0x103900f
test byte [eax + 0x1c], 2
je 0x103900f
push dword [ebp - 4]
push ebx
push dword [ebp - 0x10]
push esi
push 0x2a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010325a5
mov eax, dword [0x1049104]
add ebx, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
cmp ebx, ecx
jb 0x1038fc2
cmp eax, edi
je 0x1038ef1
test byte [eax + 0x1c], 2
je 0x1038ef1
push ebx
push esi
push 0x2b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245cc
mov eax, dword [0x1049104]
jmp 0x1038ef1
cmp eax, edi
je 0x1039127
test byte [eax + 0x1c], 1
je 0x1039127
push esi
push 0x25
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245a6
jmp 0x1039122
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1039127
test byte [eax + 0x1c], 1
je 0x1039127
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1049104]
push esi
push 0x29
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245cc
jmp 0x1039122
cmp eax, edi
je 0x1039127
test byte [eax + 0x1c], 1
je 0x1039127
push ecx
push dword [ebp + 0x10]
push esi
push 0x27
jmp 0x1038ebd
mov eax, dword [0x1049104]
cmp eax, edi
je 0x10390d6
test byte [eax + 0x1c], 2
je 0x10390d6
push esi
push 0x2c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245a6
push dword [ebp + 0x14]
call sym.spoolsv.exe_PrvDllFreeSplMem
and dword [ebp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 8], eax
test eax, eax
je 0x1039149
push 2
push 1
push 0
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push dword [ecx + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x1039135
mov ecx, dword [ebp - 0x14]
xor eax, eax
inc eax
mov dword [ebx], eax
mov dword [ebx + 4], ecx
mov dword [ebx + 8], 2
mov dword [ebp - 0xc], eax
mov eax, dword [0x1049104]
cmp dword [ebp + 0x14], 0
je 0x103913a
push dword [ebp + 0x14]
call sym.spoolsv.exe_PrvDllFreeSplMem
mov eax, dword [0x1049104]
cmp dword [ebp - 8], 0
je 0x103914e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1039175
test byte [eax + 0x1c], 2
je 0x1039175
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0xc]
mov eax, dword [0x1049104]
push esi
push 0x2d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034bea
mov eax, dword [ebp - 0xc]
jmp 0x10391a4
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x10391a2
test byte [eax + 0x1c], 1
je 0x10391a2
push 6
push ebx
push esi
push 0x1b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034bea
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x1c