Function at 0x4034c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x244
mov edi, dword [0x41d4b0]
test edi, edi
je 0x403bd0
mov ebx, dword [0x41d49c]
test ebx, ebx
je 0x403bde
mov ecx, dword [0x41d4a8]
test ecx, ecx
je 0x403bde
mov edx, dword [0x41d4a4]
test edx, edx
je 0x403bde
mov eax, dword [0x41d4a0]
test eax, eax
je 0x403bde
lea edi, [ebp - 0x22c]
lea esi, [ebp - 0x20c]
mov dword [ebp - 0x22c], 0x100
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.winspool.drv_GetDefaultPrinterW
sub esp, 8
test eax, eax
je 0x403c30
mov eax, dword fs:[0x18]
mov dword [eax + 0x34], 0xdeadbeef
mov eax, dword [0x41d4b0]
lea ebx, [ebp - 0x230]
test eax, eax
je 0x403c08
mov dword [esp + 4], ebx
mov dword [esp], 0x41d040
call eax
sub esp, 8
mov edx, eax
mov dword [ebp - 0x234], edx
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x386
xor eax, eax
mov dword [esp + 4], str.OpenPort_succeeded_n
mov edx, dword [ebp - 0x234]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00401a30
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x387
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
mov dword [esp + 4], str.GetLastError_____lu_n
mov dword [esp + 8], edx
cmp dword [eax + 0x34], 0xdeadbeef
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401a30
mov eax, dword [0x41d4b0]
test eax, eax
je 0x403c88
mov dword [esp + 4], ebx
mov dword [esp], str.FILE
call eax
sub esp, 8
mov edx, eax
mov dword [ebp - 0x234], edx
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x38a
xor eax, eax
mov dword [esp + 4], str.OpenPort_succeeded_n
mov edx, dword [ebp - 0x234]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00401a30
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x38b
mov eax, dword fs:[0x18]
mov edx, dword [eax + 0x34]
mov dword [esp + 4], str.GetLastError_____lu_n
mov dword [esp + 8], edx
cmp dword [eax + 0x34], 0xdeadbeef
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401a30
mov eax, dword [0x41d4b0]
test eax, eax
je 0x403c60
mov dword [esp + 4], ebx
mov dword [esp], str.FILE:
call eax
sub esp, 8
mov edx, eax
mov dword [ebp - 0x234], edx
call fcn.00406970
mov ebx, dword fs:[0x18]
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x38e
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.OpenPort_failed___lu__n
mov dword [esp + 8], eax
mov edx, dword [ebp - 0x234]
mov dword [esp], edx
call fcn.00401a30
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 0xc], edi
mov dword [esp + 8], 4
mov dword [esp + 4], str.test
mov eax, dword [ebp - 0x230]
mov dword [esp], eax
call dword [0x41d4a4]
sub esp, 0x10
mov dword [ebp - 0x234], eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x392
xor eax, eax
mov dword [esp + 4], str.WritePort_succeeded_n
mov edx, dword [ebp - 0x234]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00401a30
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x393
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetLastError_____lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 6
sete al
mov dword [esp], eax
call fcn.00401a30
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 4], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x230]
mov dword [esp], eax
call dword [0x41d4a8]
sub esp, 0x14
mov dword [ebp - 0x234], eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x397
xor eax, eax
mov dword [esp + 4], str.StartDocPort_succeeded_n
mov edx, dword [ebp - 0x234]
test edx, edx
sete al
mov dword [esp], eax
call fcn.00401a30
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x398
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetLastError_____lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 0x57
sete al
mov dword [esp], eax
call fcn.00401a30
lea edx, [ebp - 0x228]
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 0
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 0x10], edx
mov dword [esp + 4], esi
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x230]
mov dword [esp], eax
call dword [0x41d4a8]
sub esp, 0x14
mov dword [ebp - 0x234], eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x39d
xor eax, eax
mov dword [esp + 4], str.StartDocPort_succeeded_n
mov ecx, dword [ebp - 0x234]
test ecx, ecx
sete al
mov dword [esp], eax
call fcn.00401a30
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x39e
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.GetLastError_____lu_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebx + 0x34], 0x57
sete al
mov dword [esp], eax
call fcn.00401a30
lea edx, [ebp - 0x228]
mov dword [ebp - 0x224], 0x41d040
mov dword [esp + 0x10], edx
mov dword [esp + 4], esi
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x230]
mov dword [esp], eax
call dword [0x41d4a8]
sub esp, 0x14
mov dword [ebp - 0x234], eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3a2
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.StartDocPort_failed___lu__n
mov dword [esp + 8], eax
mov ecx, dword [ebp - 0x234]
mov dword [esp], ecx
call fcn.00401a30
lea edx, [ebp - 0x228]
mov dword [esp + 4], esi
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x230]
mov dword [esp], eax
call dword [0x41d4a8]
sub esp, 0x14
mov esi, eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3a5
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.StartDocPort_failed___lu__n
call fcn.00401a30
mov dword [esp + 0xc], edi
mov dword [esp + 8], 4
mov dword [esp + 4], str.test
mov eax, dword [ebp - 0x230]
mov dword [esp], eax
call dword [0x41d4a4]
sub esp, 0x10
mov esi, eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3a8
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.WritePort_failed___lu__n
call fcn.00401a30
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3a9
mov eax, dword [ebp - 0x22c]
mov dword [esp + 4], str.no___ld_n
cmp eax, 4
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401a30
mov eax, dword [ebp - 0x230]
mov dword [esp], eax
call dword [0x41d4a0]
sub esp, 4
mov esi, eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3ac
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.EndDocPort_failed___lu__n
call fcn.00401a30
mov eax, dword [ebp - 0x230]
mov dword [esp], eax
call dword [0x41d4a0]
sub esp, 4
mov esi, eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3ae
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.EndDocPort_failed___lu__n
call fcn.00401a30
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x41d040
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov esi, eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3b1
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.CreateFile_failed___lu__n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.00401a30
lea eax, [ebp - 0x21c]
mov dword [esp], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x10
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov edi, eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3b3
mov eax, dword [ebx + 0x34]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.ReadFile_failed___lu__n
call fcn.00401a30
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3b4
mov eax, dword [ebp - 0x22c]
mov dword [esp + 4], str.no___ld_n
cmp eax, 4
mov dword [esp + 8], eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401a30
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x230]
sub esp, 4
mov dword [esp], eax
call dword [0x41d49c]
sub esp, 4
mov esi, eax
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x3b8
mov eax, dword [ebx + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.ClosePort_failed___lu__n
call fcn.00401a30
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [0x41d4ac]
test esi, esi
jne 0x4034da
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x379
mov dword [esp], str.FILE:_port_n
call fcn.004019f0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x41d040
mov eax, dword [0x41d4cc]
mov dword [esp], eax
call dword [0x41d4ac]
sub esp, 0xc
mov edx, eax
jmp 0x403570
call fcn.00406970
mov dword [eax], 0x40a123
mov dword [eax + 4], 0x380
mov dword [esp], str.no_default_printer_n
call fcn.00401480
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], str.FILE:
mov eax, dword [0x41d4cc]
mov dword [esp], eax
call dword [0x41d4ac]
sub esp, 0xc
mov edx, eax
jmp 0x403690
mov dword [esp + 8], ebx
mov dword [esp + 4], str.FILE
mov eax, dword [0x41d4cc]
mov dword [esp], eax
call dword [0x41d4ac]
sub esp, 0xc
mov edx, eax
jmp 0x403600