Function at 0x1000b46c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10020
call fcn.100281b0
mov eax, dword [0x1003e01c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1000b400
cmp eax, 1
jne 0x1000b527
mov ecx, dword [edi]
lea eax, [ebp - 0x1001c]
push 8
push eax
call fcn.10008be0
test al, al
je 0x1000b505
jmp 0x1000b420
mov ecx, dword [ebp - 0x10018]
test ecx, ecx
je 0x1000b455
push ecx
mov ecx, dword [edi]
lea eax, [ebp - 0x10014]
push eax
call fcn.10008be0
test al, al
je 0x1000b53c
mov eax, dword [ebp - 0x10018]
mov byte [ebp + eax - 0x10014], 0
mov ecx, dword [ebp - 0x10018]
mov eax, dword [ebp - 0x1001c]
dec eax
cmp eax, 3
ja case.default.0x1000b465
jmp dword [eax*4 + 0x1000b648]
lea esi, [ecx + 8]
mov dword [ebp - 0x1001c], 4
test esi, esi
je case.0x1000b465.4
mov eax, dword [edi]
test eax, eax
je 0x1000b4b1
mov eax, dword [eax + 4]
cmp eax, 0xffffffff
je 0x1000b4b1
push 0
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push ecx
push esi
lea ecx, [ebp - 0x1001c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x1000b4b1
cmp dword [ebp - 0xc], esi
je case.0x1000b465.4
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1000b4d1
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1000b4c5
cmp eax, 1
jne 0x1000b4d1
lea eax, [edi + 0x54]
push eax
push dword [edi + 0x50]
call ecx
add esp, 8
mov esi, dword [edi]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
mov dword [edi + 4], 0
mov ecx, dword [edi]
lea eax, [ebp - 0x1001c]
push 8
push eax
call fcn.10008be0
test al, al
jne 0x1000b420
mov eax, dword [edi]
cmp byte [eax], 0
jne 0x1000b527
mov dword [edi + 0x50], 1
mov edx, str.Pipe_closed
lea ecx, [edi + 0x54]
call fcn.1000ab10
mov ecx, edi
call fcn.1000b2e0
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.1002769f
mov esp, ebp
pop ebp
ret 4
mov dword [edi + 0x50], 2
mov edx, str.Partial_data_in_frame
jmp 0x1000b518
lea eax, [ebp - 0x10014]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], eax
mov ecx, ebx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
call fcn.1000b660
push ecx
mov edx, str.code
mov ecx, ebx
call fcn.100092d0
add esp, 4
mov dword [edi + 0x50], eax
mov edx, str.message
mov ecx, ebx
push 0x1002c8c2
call fcn.10009340
add esp, 4
mov edx, eax
jmp 0x1000b518
lea eax, [ebp - 0x10014]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], eax
mov ecx, ebx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
call fcn.1000b660
mov ecx, dword [ebp - 8]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1002769f
mov esp, ebp
pop ebp
ret 4
lea ebx, [edi + 0x54]
mov dword [edi + 0x50], 2
mov edx, ebx
mov esi, 1
mov eax, edx
sub eax, edi
sub esi, str.Bad_ipc_frame
lea ecx, [eax + 0x10031a04]
jmp 0x1000b5f0
lea eax, [esi + ecx]
cmp eax, 0x100
jae 0x1000b605
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
cmp byte [ecx], 0
jne 0x1000b5f0
mov byte [edx], 0
mov ecx, dword [edi + 0xc]
test ecx, ecx
je 0x1000b625
mov eax, dword [edi + 4]
cmp eax, 3
je 0x1000b61c
cmp eax, 1
jne 0x1000b625
push ebx
push dword [edi + 0x50]
call ecx
add esp, 8
mov esi, dword [edi]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 4], 0xffffffff
mov byte [esi], 0
mov dword [edi + 4], 0
jmp 0x1000b527