Function at 0x10389f6
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, 0x1023aac
cmp eax, edi
je 0x1038a3d
test byte [eax + 0x1c], 2
je 0x1038a3d
push dword [ebp + 0x1c]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push esi
push 0x14
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034780
mov ecx, dword [ebp + 8]
cmp ecx, ebx
je 0x1038ea6
cmp dword [ecx], 0x6060
jne 0x1038ea6
mov eax, dword [ebp + 0x14]
dec eax
je 0x1038a91
push 0x7c
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038ea1
test byte [eax + 0x1c], 1
je 0x1038e7a
push dword [ebp + 0x14]
push 0x7c
push esi
push 0x18
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034df7
jmp 0x1038e75
push 0xc
pop ebx
cmp dword [ebp + 0x1c], ebx
jae 0x1038ac5
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 0x1038ea1
test byte [eax + 0x1c], 1
je 0x1038e7a
push ebx
push 0x7a
push esi
push 0x16
jmp 0x1038a81
mov ebx, dword [ebp + 0x18]
test ebx, ebx
jne 0x1038b00
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038ea1
test byte [eax + 0x1c], 1
je 0x1038e7a
push 0x57
push esi
push 0x17
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034754
jmp 0x1038e75
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 0x1038b7e
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038b3a
test byte [eax + 0x1c], 2
je 0x1038b3a
push dword [ebp + 0x10]
push esi
push 0x19
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034754
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 0x1038b77
test byte [eax + 0x1c], 2
je 0x1038b77
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1049104]
push ebx
push esi
push 0x1a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034df7
mov eax, ebx
jmp 0x1038ed0
cmp dword [ecx + 0x1c], 0xffffffff
jne 0x1038baf
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038ece
test byte [eax + 0x1c], 1
je 0x1038ece
push 6
push 0
push esi
push 0x1b
jmp 0x1038ec3
push 0x40000
call sym.spoolsv.exe_PrvDllAllocSplMem
mov dword [ebp + 0x14], eax
test eax, eax
jne 0x1038bf9
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038e53
test byte [eax + 0x1c], 1
je 0x1038e53
push 0x40000
push 8
push esi
push 0x1c
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034df7
jmp 0x1038e4e
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038c20
test byte [eax + 0x1c], 2
je 0x1038c20
push esi
push 0x1d
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01023f56
mov eax, dword [0x1049104]
jmp 0x1038c20
mov ebx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
mov ecx, 0x40000
mov dword [ebp + 0x1c], edx
cmp edx, ecx
jb 0x1038c32
mov dword [ebp + 0x1c], ecx
cmp dword [ebp + 0x1c], 0
je 0x1038dea
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 0x1038de5
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038c87
test byte [eax + 0x1c], 2
je 0x1038c87
push dword [ebp - 4]
push dword [ebp + 0x1c]
push dword [ebp + 0x10]
push esi
push 0x1e
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034780
mov eax, dword [0x1049104]
mov ecx, dword [ebp - 4]
test ecx, ecx
je 0x1038d70
cmp dword [ebp + 0x10], ecx
jb 0x1038dcb
cmp eax, edi
je 0x1038cc5
test byte [eax + 0x1c], 2
je 0x1038cc5
mov edx, dword [ebp + 0x10]
push ecx
push dword [ebp + 0x10]
sub edx, ecx
push edx
push esi
push 0x20
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034780
mov ecx, dword [ebp - 4]
mov eax, dword [0x1049104]
sub dword [ebp + 0x10], ecx
cmp eax, edi
je 0x1038ce8
test byte [eax + 0x1c], 2
je 0x1038ce8
push esi
push 0x22
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01023f56
mov ecx, dword [ebp - 4]
mov eax, dword [0x1049104]
xor ebx, ebx
test ecx, ecx
jbe 0x1038d45
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 0x1038d95
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038d3b
test byte [eax + 0x1c], 2
je 0x1038d3b
push dword [ebp - 4]
push ebx
push dword [ebp - 0x10]
push esi
push 0x24
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034780
mov eax, dword [0x1049104]
add ebx, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
cmp ebx, ecx
jb 0x1038cee
cmp eax, edi
je 0x1038c1d
test byte [eax + 0x1c], 2
je 0x1038c1d
push ebx
push esi
push 0x25
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034754
mov eax, dword [0x1049104]
jmp 0x1038c1d
cmp eax, edi
je 0x1038e53
test byte [eax + 0x1c], 1
je 0x1038e53
push esi
push 0x1f
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01023f56
jmp 0x1038e4e
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038e53
test byte [eax + 0x1c], 1
je 0x1038e53
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [0x1049104]
push esi
push 0x23
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034754
jmp 0x1038e4e
cmp eax, edi
je 0x1038e53
test byte [eax + 0x1c], 1
je 0x1038e53
push ecx
push dword [ebp + 0x10]
push esi
push 0x21
jmp 0x1038be9
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038e02
test byte [eax + 0x1c], 2
je 0x1038e02
push esi
push 0x26
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01023f56
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 0x1038e75
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 0x1038e61
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 0x1038e66
push dword [ebp + 0x14]
call sym.spoolsv.exe_PrvDllFreeSplMem
mov eax, dword [0x1049104]
cmp dword [ebp - 8], 0
je 0x1038e7a
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038ea1
test byte [eax + 0x1c], 2
je 0x1038ea1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp - 0xc]
mov eax, dword [0x1049104]
push esi
push 0x27
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034df7
mov eax, dword [ebp - 0xc]
jmp 0x1038ed0
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [0x1049104]
cmp eax, edi
je 0x1038ece
test byte [eax + 0x1c], 1
je 0x1038ece
push 6
push ebx
push esi
push 0x15
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034df7
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x1c