Function at 0x4019e0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
sub esp, 0xe04
push ebx
mov eax, dword [esp + 0xe14]
push ebp
push esi
xor ebx, ebx
push edi
push ebx
push 0x80
push 3
push ebx
push ebx
push 0x80000000
push eax
mov dword [esp + 0x34], ebx
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401a2b
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe04
ret 0x10
lea ecx, [esp + 0x20]
push ebx
push ecx
lea edx, [esp + 0x40]
push 0x2d8
push edx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401d5e
mov eax, dword [esp + 0x20]
push esi
cmp eax, 0x2d8
je 0x401a6e
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe04
ret 0x10
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x310]
push 0x104
mov ecx, dword [esp + 0xe1c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0x10]
push ebx
lea eax, [esp + 0x3c]
push edx
push eax
mov dword [esp + 0x1c], ebx
call sub.WINSPOOL.DRV_OpenPrinterA
test eax, eax
je 0x401bdc
mov edx, dword [esp + 0x10]
push ebx
push ebx
lea ecx, [esp + 0x40]
push ebx
push ecx
push edx
push ebx
call sub.WINSPOOL.DRV_DocumentPropertiesA
mov esi, eax
push esi
call fcn.004023eb
push esi
mov ebp, eax
call fcn.004023eb
add esp, 8
cmp ebp, ebx
mov dword [esp + 0x18], eax
je 0x401bdc
cmp eax, ebx
je 0x401bdc
mov ecx, dword [esp + 0x10]
push 2
push ebx
lea eax, [esp + 0x40]
push ebp
push eax
push ecx
push ebx
call sub.WINSPOOL.DRV_DocumentPropertiesA
mov esi, dword [sym.imp.WINSPOOL.DRV_DeviceCapabilitiesA]
lea edx, [esp + 0x614]
push ebx
push edx
push 3
lea eax, [esp + 0x44]
push ebx
push eax
call esi
lea ecx, [esp + 0x414]
push ebx
push ecx
push 2
lea edx, [esp + 0x44]
push ebx
push edx
mov edi, eax
call esi
xor ecx, ecx
xor eax, eax
cmp edi, ebx
mov dword [esp + 0x14], ebx
jle 0x401b6e
lea esi, [esp + 0x618]
lea ebx, [esp + 0x414]
cmp word [ebx], 0x100
je 0x401b61
mov edx, dword [esi - 4]
cmp edx, ecx
jle 0x401b55
mov ecx, edx
mov dword [esp + 0x14], eax
mov edx, dword [esi]
cmp edx, ecx
jle 0x401b61
mov ecx, edx
mov dword [esp + 0x14], eax
inc eax
add ebx, 2
add esi, 8
cmp eax, edi
jl 0x401b41
xor ebx, ebx
mov eax, dword [esp + 0x14]
mov cx, word [esp + eax*2 + 0x414]
mov word [ebp + 0x2e], cx
mov eax, dword [esp + 0x2ec]
cmp eax, 0x1c2
jbe 0x401b93
cmp eax, 0x546
jb 0x401ba1
cmp eax, 0x8ca
jbe 0x401ba9
cmp eax, 0xc4e
jae 0x401ba9
mov word [ebp + 0x2c], 1
jmp 0x401baf
mov word [ebp + 0x2c], 2
mov eax, dword [ebp + 0x28]
test ah, 8
je 0x401bc4
cmp word [ebp + 0x3c], 1
jne 0x401bc4
mov word [ebp + 0x3c], 2
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push 0xa
push ebp
lea eax, [esp + 0x40]
push edx
push eax
push ecx
push ebx
call sub.WINSPOOL.DRV_DocumentPropertiesA
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x401bee
push eax
call sub.WINSPOOL.DRV_ClosePrinter
mov dword [esp + 0x10], ebx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x38]
push edx
push ebx
push eax
push str.WINSPOOL
call dword [sym.imp.GDI32.dll_CreateDCA]
mov ebx, eax
xor eax, eax
cmp ebx, eax
je 0x401da9
sub esp, 0x14
lea ecx, [esp + 0x324]
mov edi, esp
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
push eax
mov dword [esp + 0x40], ecx
lea edx, [esp + 0x150]
lea eax, [esp + 0x50]
mov ecx, 5
lea esi, [esp + 0x3c]
mov dword [esp + 0x3c], 0x14
mov dword [esp + 0x44], edx
push eax
rep movsd dword es:[edi], dword [esi]
push ebx
call fcn.004013b0
add esp, 0x20
push ebx
call dword [sym.imp.GDI32.dll_EndPage]
push ebx
call dword [sym.imp.GDI32.dll_EndDoc]
mov eax, dword [esp + 0x30c]
test eax, eax
je 0x401c87
mov eax, dword [esp + 0x308]
test eax, eax
jne 0x401c87
lea ecx, [esp + 0x38]
push ecx
push ebx
call fcn.00401360
add esp, 8
push ebx
call dword [sym.imp.GDI32.dll_DeleteDC]
mov esi, dword [esp + 0x2fc]
xor edx, edx
mov ecx, dword [esp + 0x2dc]
mov dword [esp + 0x300], 0
mov eax, ecx
shl eax, 7
sub eax, ecx
mov ecx, dword [esp + 0x2e0]
shl eax, 1
div esi
xor edx, edx
mov edi, eax
mov eax, ecx
shl eax, 7
sub eax, ecx
mov ecx, dword [esp + 0x14]
shl eax, 1
div esi
mov edx, 1
cmp word [ebp + 0x2c], dx
jne 0x401ced
cmp edi, dword [esp + ecx*8 + 0x614]
jge 0x401cff
cmp eax, dword [esp + ecx*8 + 0x618]
jl 0x401d06
jmp 0x401cff
cmp edi, dword [esp + ecx*8 + 0x618]
jge 0x401cff
cmp eax, dword [esp + ecx*8 + 0x614]
jl 0x401d06
mov dword [esp + 0x300], edx
mov edi, dword [esp + 0xe20]
push 0
push 0x80
push 3
push 0
push 0
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401d42
call dword [sym.imp.KERNEL32.dll_GetLastError]
or eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe04
ret 0x10
lea edx, [esp + 0x1c]
push 0
push edx
lea eax, [esp + 0x40]
push 0x2d8
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401d7d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xfffffffe
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe04
ret 0x10
mov eax, dword [esp + 0x1c]
push esi
cmp eax, 0x2d8
je 0x401da1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0xfffffffd
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe04
ret 0x10
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401db0
mov edi, dword [esp + 0xe20]
test ebp, ebp
je 0x401dbd
push ebp
call fcn.00402382
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401dce
push eax
call fcn.00402382
add esp, 4
push 0x5c
push edi
call fcn.00402510
add esp, 8
test eax, eax
jne 0x401de1
mov eax, edi
jmp 0x401de2
inc eax
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
test esi, esi
jne 0x401e0a
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe04
ret 0x10
push esi
call dword [sym.imp.KERNEL32.dll_SetEvent]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe04
ret 0x10