Function at 0x5bae80
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x20
push esi
mov esi, dword [esp + 0x2c]
test esi, esi
jne 0x5bae93
xor eax, eax
pop esi
add esp, 0x20
ret
push esi
call fcn.005c0970
add esp, 4
test eax, eax
jne 0x5baea5
pop esi
add esp, 0x20
ret
mov eax, dword [esi]
mov ecx, 1
push ebx
push ebp
cmp eax, ecx
push edi
mov dword [esp + 0x14], 0
jne 0x5baf9f
mov eax, dword [esp + 0x34]
mov esi, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], ecx
jle 0x5bb1d0
mov ebx, dword [sym.imp.kernel32.dll_WriteFile]
lea eax, [esp + 0x44]
mov dword [esp + 0x18], eax
jmp 0x5baeea
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 8]
xor ebp, ebp
cmp ecx, 0x80000004
jne 0x5baefb
mov edi, dword [eax]
jmp 0x5baf21
push eax
call fcn.005c07d0
mov edi, eax
add esp, 4
test edi, edi
jne 0x5baf1c
push eax
lea eax, [esp + 0x20]
push eax
push 2
push 0x6db6de
push esi
call ebx
jmp 0x5baf73
mov ebp, 1
push edi
call dword [0x6db9aa]
add esp, 4
test eax, eax
jle 0x5baf5a
lea ecx, [esp + 0x1c]
push 0
push ecx
push eax
push edi
push esi
call ebx
test eax, eax
je 0x5baf52
lea edx, [esp + 0x1c]
push 0
push edx
push 2
push 0x6db6de
push esi
call ebx
jmp 0x5baf5a
mov dword [esp + 0x14], 0
test ebp, ebp
je 0x5baf67
push edi
call fcn.005d34a3
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x5bb1d0
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x34]
inc eax
add edx, 0xc
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], edx
jl 0x5baee6
mov eax, dword [esp + 0x14]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x20
ret
cmp eax, 2
jne 0x5bb035
mov eax, dword [esp + 0x34]
mov esi, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x14], ecx
jle 0x5bb1d0
dec eax
lea ebp, [esp + 0x44]
mov dword [esp + 0x34], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, 0x80000004
jne 0x5bafd5
mov edi, dword [ebp]
jmp 0x5bafe9
push ebp
call fcn.005c07d0
mov edi, eax
add esp, 4
test edi, edi
je 0x5bb01b
mov ebx, 1
push edi
call dword [0x6db9aa]
add esp, 4
test eax, eax
jle 0x5bb000
mov edx, dword [esi]
push eax
push edi
mov ecx, esi
call dword [edx + 0x24]
mov eax, dword [esi]
push 2
push 0x6db6de
mov ecx, esi
call dword [eax + 0x24]
test ebx, ebx
je 0x5bb01b
push edi
call fcn.005d34a3
add esp, 4
mov eax, dword [esp + 0x34]
add ebp, 0xc
dec eax
mov dword [esp + 0x34], eax
jne 0x5bafc4
mov eax, dword [esp + 0x14]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x20
ret
cmp eax, 3
jne 0x5bb1d0
mov eax, dword [esp + 0x34]
mov edi, dword [esi + 4]
cmp eax, ecx
mov byte [esp + 0x10], 2
mov byte [esp + 0x11], 0
mov dword [esp + 0x14], ecx
mov dword [esp + 0x2c], ecx
jle 0x5bb1d0
lea ebx, [esp + 0x44]
mov dword [esp + 0x1c], ebx
mov eax, dword [ebx + 8]
mov dword [esp + 0x28], 0
cmp eax, 0x80000004
jne 0x5bb081
mov ecx, dword [ebx]
mov dword [esp + 0x18], ecx
jmp 0x5bb0e5
push ebx
call fcn.005c07d0
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
jne 0x5bb0dd
push 1
push eax
push eax
push edi
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov ecx, dword [esi + 0xc]
lea edx, [esi + 0x10]
push edx
lea edx, [esi + 0x34]
push ecx
push edx
lea ecx, [esp + 0x1c]
push 2
push ecx
push eax
mov byte [esp + 0x28], 0xd
mov byte [esp + 0x29], 0xa
call fcn.005c00f0
add esp, 0x18
lea edx, [esp + 0x24]
lea eax, [esp + 0x10]
push 0
push edx
push 2
push eax
push edi
call dword [sym.imp.kernel32.dll_WriteFile]
jmp 0x5bb1b4
mov dword [esp + 0x28], 1
mov ecx, dword [esp + 0x18]
push ecx
call dword [0x6db9aa]
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
jle 0x5bb197
push 1
push 0
push 0
push edi
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov edx, dword [esi + 0xc]
mov ecx, dword [esp + 0x20]
lea ebp, [esi + 0x10]
lea ebx, [esi + 0x34]
push ebp
push edx
mov edx, dword [esp + 0x20]
push ebx
push ecx
push edx
push eax
call fcn.005c00f0
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
add esp, 0x18
lea eax, [esp + 0x24]
push 0
push eax
push ecx
push edx
push edi
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x5bb18b
push 1
push 0
push 0
push edi
call dword [sym.imp.kernel32.dll_SetFilePointer]
mov ecx, dword [esi + 0xc]
push ebp
push ecx
push ebx
lea edx, [esp + 0x1c]
push 2
push edx
push eax
mov byte [esp + 0x28], 0xd
mov byte [esp + 0x29], 0xa
call fcn.005c00f0
add esp, 0x18
lea eax, [esp + 0x24]
lea ecx, [esp + 0x10]
push 0
push eax
push 2
push ecx
push edi
call dword [sym.imp.kernel32.dll_WriteFile]
jmp 0x5bb193
mov dword [esp + 0x14], 0
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x5bb1ac
mov edx, dword [esp + 0x18]
push edx
call fcn.005d34a3
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x5bb1d0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
inc eax
add ebx, 0xc
cmp eax, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], ebx
jl 0x5bb067
mov eax, dword [esp + 0x14]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x20
ret