Function at 0x401ad0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14c
push ebx
push ebp
push esi
push edi
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x14]
push eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push 0x80
push ecx
push 0xfffffffffffffff5
mov word [esp + 0x28], 1
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401b4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x164]
mov esi, eax
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
lea eax, [esp + 0x98]
push str.Error__lu_al_escribir_registro_de_resultados_en_el_unnamed_pipe
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
lea ecx, [esp + 0x94]
push 0
push ecx
jmp 0x401c92
mov edx, dword [esp + 0x160]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x401b80
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [esp + 0x164]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
push str.Error__lu_al_se
jmp 0x401c77
mov ebp, dword [esp + 0x164]
xor ebx, ebx
mov edx, dword [ebp + 4]
test edx, edx
jbe 0x401c23
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x14]
sub edx, ebx
rep stosd dword es:[edi], eax
cmp edx, 0x7c
mov word [esp + 0x14], 2
jbe 0x401bb8
mov word [esp + 0x16], 0x7c
jmp 0x401bc4
mov ax, word [ebp + 4]
sub ax, bx
mov word [esp + 0x16], ax
mov ecx, dword [esp + 0x16]
mov esi, dword [ebp]
and ecx, 0xffff
add esi, ebx
mov edx, ecx
lea edi, [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0
and ecx, 3
lea edx, [esp + 0x18]
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x1a]
lea ecx, [esp + 0x14]
push ecx
push 0x80
and eax, 0xffff
push edx
push 0xfffffffffffffff5
add ebx, eax
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401cb1
mov edx, dword [ebp + 4]
cmp ebx, edx
jb 0x401b94
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x14]
lea edx, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x16], eax
push eax
push edx
lea eax, [esp + 0x1c]
push 0x80
push eax
push 0xfffffffffffffff5
mov word [esp + 0x28], 3
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x401d00
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
push str.Error__lu_al_escribir_registro_de_resultados_del_unnamed_pipe
lea ecx, [esp + 0x9c]
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
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
lea eax, [esp + 0x98]
push str.Error__lu_al_escribir_registro_de_resultados_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
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14c
ret