Function at 0x4013a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14c
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x1f
xor eax, eax
lea edi, [esp + 0x16]
mov word [esp + 0x14], bp
push 2
rep stosd dword es:[edi], eax
push 0x40
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, dword [esp + 0x164]
cmp eax, ebp
mov dword [ebx], eax
jne 0x40141e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [esp + 0x94]
push esi
push 0x403124
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x94]
push ebp
push ecx
push str.C.G.I._RPCPedidos
push 0x3ea
push 1
call dword [sym.imp.Btel.dll__ReportBackTpvEvent_20]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
lea edx, [esp + 0x10]
push ebp
push edx
lea eax, [esp + 0x1c]
push 0x80
mov dword [ebx + 4], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
push 0xfffffffffffffff6
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401502
mov eax, dword [esp + 0x14]
and eax, 0xffff
dec eax
je 0x4014c5
dec eax
je 0x40146a
dec eax
jne 0x4014d2
mov eax, dword [esp + 0x16]
test eax, eax
jne 0x401553
jmp 0x4014d2
mov ecx, dword [esp + 0x16]
mov edx, dword [ebx + 4]
and ecx, 0xffff
push 2
lea eax, [ecx + edx + 2]
mov ecx, dword [ebx]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
test eax, eax
je 0x4015a2
mov ecx, dword [esp + 0x16]
mov edi, dword [ebx + 4]
and ecx, 0xffff
lea esi, [esp + 0x18]
mov edx, ecx
add edi, eax
shr ecx, 2
mov dword [ebx], eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x16]
mov ecx, dword [ebx + 4]
and eax, 0xffff
add ecx, eax
mov dword [ebx + 4], ecx
jmp 0x4014d2
mov edx, dword [esp + 0x160]
mov ecx, dword [esp + 0x16]
mov dword [edx], ecx
cmp word [esp + 0x14], 3
je 0x4015f3
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x1c]
push 0x80
push ecx
push 0xfffffffffffffff6
call ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40144a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov esi, eax
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
lea eax, [esp + 0x98]
push str.Error__lu_al_leer_registro_de_parametros_del_unnamed_pipe
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x94]
push 0
push ecx
push str.C.G.I._RPCPedidos
push 0x3ea
push 1
call dword [sym.imp.Btel.dll__ReportBackTpvEvent_20]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
mov edx, dword [ebx]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x16]
lea ecx, [esp + 0x94]
push eax
push str.Codigo_de_error___lu__le
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x94]
push 0
push edx
push str.C.G.I._RPCPedidos
push 0x3ea
push 1
call dword [sym.imp.Btel.dll__ReportBackTpvEvent_20]
mov eax, dword [esp + 0x16]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebx]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
lea ecx, [esp + 0x98]
push 0x403124
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea edx, [esp + 0x94]
push 0
push edx
push str.C.G.I._RPCPedidos
push 0x3ea
push 1
call dword [sym.imp.Btel.dll__ReportBackTpvEvent_20]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14c
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14c
ret