Function at 0x402be0
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x2998
call fcn.00405280
mov al, byte [0x42d924]
push ebx
push ebp
push esi
test al, al
push edi
je 0x402c18
mov eax, dword [esp + 0x29ac]
mov ecx, dword [0x42d920]
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
push eax
push str.Sending_file__s_to_LPD_n
push ecx
call edi
add esp, 0xc
jmp 0x402c1e
mov edi, dword [sym.imp.MSVCRT.dll_fprintf]
mov al, byte [0x42d924]
mov esi, dword [esp + 0x29b0]
test al, al
je 0x402c40
mov edx, dword [0x42d920]
push esi
push str.jobhost___s_n
push edx
call edi
add esp, 0xc
mov al, byte [0x42d924]
test al, al
je 0x402c8a
mov eax, dword [esp + 0x29b4]
mov ecx, dword [0x42d920]
push eax
push str.jobowner___s_n
push ecx
call edi
mov al, byte [0x42d924]
add esp, 0xc
test al, al
je 0x402c8a
mov edx, dword [esp + 0x29b8]
mov eax, dword [0x42d920]
push edx
push str.jobid___s_n
push eax
call edi
mov al, byte [0x42d924]
add esp, 0xc
test al, al
mov ebp, dword [esp + 0x29bc]
je 0x402ca5
mov ecx, dword [0x42d920]
push ebp
push str.printer___s_n
push ecx
call edi
add esp, 0xc
mov al, byte [0x42d924]
test al, al
je 0x402cc6
mov edx, dword [esp + 0x29c0]
mov eax, dword [0x42d920]
push edx
push str.copies___s_n
push eax
call edi
add esp, 0xc
mov eax, dword [0x42d920]
test eax, eax
je 0x402cd9
push eax
call dword [sym.imp.MSVCRT.dll_fflush]
add esp, 4
push 0x5000
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x402d16
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov ecx, dword [0x42d920]
push str.Malloc_failed__n
push ecx
call edi
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov edx, dword [esp + 0x29ac]
push 0x8000
push edx
call dword [sym.imp.MSVCRT.dll__open]
add esp, 8
mov dword [esp + 0x18], eax
test eax, eax
jne 0x402d65
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov eax, dword [esp + 0x29ac]
mov ecx, dword [0x42d920]
push eax
push str.Can_not_open_file__s_n
push ecx
call edi
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
lea edx, [esp + 0x20]
push edx
push eax
call dword [sym.imp.MSVCRT.dll__fstat]
add esp, 8
test eax, eax
je 0x402da9
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov eax, dword [esp + 0x29ac]
mov ecx, dword [0x42d920]
push eax
push str.fstat_failed_for_file__s_n
push ecx
call edi
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov eax, dword [0x430558]
lea edx, [esp + 0x10]
push edx
push 0x2710
push eax
push str.127.0.0.1
call fcn.0040554a
add esp, 0x10
test eax, eax
je 0x402e83
push 0x100
lea ecx, [esp + 0xac]
push str.SAPLPDSAPLPD.EXE__I
push ecx
call fcn.00410783
add esp, 0xc
lea edx, [esp + 0xa8]
push edx
call fcn.004027d0
add esp, 4
cmp al, 0x30
je 0x402e2d
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov ecx, dword [0x42d920]
lea eax, [esp + 0xa8]
push eax
push str.Starting__s_failed_n
push ecx
call edi
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
push 0xa
call fcn.004100cb
mov eax, dword [0x430558]
add esp, 4
lea edx, [esp + 0x10]
push edx
push 0x2710
push eax
push str.127.0.0.1
call fcn.0040554a
add esp, 0x10
test eax, eax
je 0x402e83
mov cl, byte [0x42d924]
test cl, cl
je 0x4033aa
mov ecx, dword [0x42d920]
push eax
push str.NiRawConnect_failed_with_code___d_n
push ecx
call edi
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push 0x415420
push ebx
call ebp
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
not ecx
push edx
dec ecx
push 0x7530
push ecx
push ebx
push eax
call fcn.004057e4
add esp, 0x14
test eax, eax
jne 0x40338d
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x14]
not ecx
dec ecx
cmp eax, ecx
jne 0x40338d
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00402b40
add esp, 4
test eax, eax
jne 0x402f16
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov edx, dword [0x42d920]
push str.ACK_failed_after_receive_printer_job_n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov eax, dword [esp + 0x29ac]
mov ecx, dword [esp + 0x29b8]
mov edx, dword [esp + 0x29b4]
push eax
push esi
push ecx
push edx
push esi
push str.H_s_nP_s_nUdfA_s_s_nJ_s_n
push ebx
call ebp
mov eax, dword [esp + 0x29dc]
add esp, 0x1c
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
test eax, eax
jle 0x402fa7
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x29b8]
push esi
push ecx
lea edx, [esp + 0x4c]
push str.ldfA_s_s_n
push edx
call ebp
lea edi, [esp + 0x54]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x10
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x1c]
mov ecx, edx
and ecx, 3
dec eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x29b0]
mov dword [esp + 0x1c], eax
jne 0x402f54
mov eax, dword [esp + 0x29b8]
push esi
push eax
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
lea ecx, [esp + 0x1b4]
push 0x4153c4
push ecx
call ebp
lea edi, [esp + 0x1bc]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
lea edx, [esp + 0x14]
lea eax, [esp + 0x1a8]
not ecx
push edx
dec ecx
push 0x7530
push ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call fcn.004057e4
add esp, 0x14
test eax, eax
jne 0x403364
lea edi, [esp + 0x1a8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x14]
not ecx
dec ecx
cmp eax, ecx
jne 0x403364
mov edx, dword [esp + 0x10]
push edx
call fcn.00402b40
add esp, 4
test eax, eax
jne 0x40304b
mov al, byte [0x42d924]
test al, al
je 0x4033aa
push str.ACK_failed_after_receive_control_file_n
jmp 0x40339b
lea ecx, [esp + 0x14]
mov edi, ebx
push ecx
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
push 0x7530
push ecx
push ebx
push edx
call fcn.004057e4
add esp, 0x14
test eax, eax
jne 0x40333b
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x14]
not ecx
cmp eax, ecx
jne 0x40333b
mov eax, dword [esp + 0x10]
push eax
call fcn.00402b40
add esp, 4
test eax, eax
jne 0x4030ca
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov ecx, dword [0x42d920]
push str.ACK_failed_after_sending_control_file_n
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov edx, dword [esp + 0x29b8]
mov eax, dword [esp + 0x34]
push esi
push edx
push eax
push 0x415360
push ebx
call ebp
add esp, 0x14
lea ecx, [esp + 0x14]
mov edi, ebx
xor eax, eax
push ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x14]
push 0x7530
not ecx
dec ecx
push ecx
push ebx
push edx
call fcn.004057e4
add esp, 0x14
test eax, eax
jne 0x40332b
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x14]
not ecx
dec ecx
cmp eax, ecx
jne 0x40332b
mov eax, dword [esp + 0x10]
push eax
call fcn.00402b40
add esp, 4
test eax, eax
jne 0x403164
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov ecx, dword [0x42d920]
push str.ACK_failed_after_receive_data_file_n
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov eax, dword [esp + 0x34]
test eax, eax
jle 0x4031d3
mov edi, dword [sym.imp.MSVCRT.dll__read]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x1a8]
push 0x2800
push edx
push eax
call edi
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x4033b5
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push 0x7530
lea edx, [esp + 0x1b0]
push esi
push edx
push eax
call fcn.004057e4
add esp, 0x14
test eax, eax
jne 0x4033d0
cmp dword [esp + 0x14], esi
jne 0x4033d0
mov eax, dword [esp + 0x34]
sub eax, esi
test eax, eax
mov dword [esp + 0x34], eax
jg 0x403172
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.MSVCRT.dll__close]
mov ecx, dword [esp + 0x14]
add esp, 4
lea edx, [esp + 0x14]
lea eax, [esp + 0x1a8]
push edx
push 0x7530
push 1
push eax
push ecx
mov byte [esp + 0x1bc], 0
call fcn.004057e4
add esp, 0x14
test eax, eax
jne 0x4032fe
cmp dword [esp + 0x14], 1
jne 0x4032fe
mov edx, dword [esp + 0x10]
push edx
call fcn.00402b40
add esp, 4
test eax, eax
jne 0x403245
mov al, byte [0x42d924]
test al, al
je 0x4033aa
push str.ACK_failed_after_sending_data_file_n
jmp 0x40339b
mov ecx, dword [esp + 0x10]
push ecx
call fcn.004059c6
add esp, 4
test eax, eax
je 0x403285
mov cl, byte [0x42d924]
test cl, cl
je 0x4033aa
push eax
push str.NiCloseHandle_failed_with_code___d_n
mov edx, dword [0x42d920]
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov esi, dword [esp + 0x29ac]
push esi
call dword [sym.imp.MSVCRT.dll__unlink]
add esp, 4
test eax, eax
je 0x4032c7
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov eax, dword [0x42d920]
push esi
push str.Could_not_remove_file__s_n
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
push ebx
call dword [sym.imp.MSVCRT.dll_free]
mov al, byte [0x42d924]
add esp, 4
test al, al
je 0x4033aa
mov ecx, dword [0x42d920]
push str.All_done..._n
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov edx, dword [0x42d920]
push str.Error_sending_final_0_byte_n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov al, byte [0x42d924]
test al, al
je 0x4033aa
push str.Error_sending_receive_data_file_n
jmp 0x40339b
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov ecx, dword [0x42d920]
push str.Error_sending_control_file_n
push ecx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov edx, dword [0x42d920]
push str.Error_sending_receive_control_file_n
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov al, byte [0x42d924]
test al, al
je 0x4033aa
push str.Error_sending_receive_printer_job_n
mov eax, dword [0x42d920]
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2998
ret
mov al, byte [0x42d924]
test al, al
je 0x4033aa
mov ecx, dword [esp + 0x29ac]
push ecx
push str.Error_reading_file__s_n
jmp 0x40326a
mov al, byte [0x42d924]
test al, al
je 0x4033aa
push str.Error_sending_data_file_n
jmp 0x40339b