Function at 0x6b411300
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
xor esi, esi
push ebx
sub esp, 0x5c
mov edi, dword [esp + 0x74]
mov ebp, dword [esp + 0x78]
mov byte [esp + 0x3b], 0
mov eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
mov dword [esp + 0x4c], eax
xor eax, eax
mov ebx, dword [esp + 0x70]
mov edx, dword [edi + 4]
test ebp, 0x40
jne 0x6b411568
test ebp, 0x80
jne 0x6b41143c
test ebp, 0x20
je 0x6b4113f0
mov eax, ebp
and eax, 0x10
cmp eax, 1
sbb ecx, ecx
and ecx, 0xfffffff8
add ecx, 9
and ebp, 0x40f
lea edx, [esp + 0x3b]
mov eax, dword [edi + 8]
mov dword [esp + 0x24], ecx
mov dword [esp + 8], 0
mov dword [esp + 4], edx
mov dword [esp], ebp
mov edx, dword [edi]
call sym._do_buf.constprop.0
test eax, eax
js 0x6b4113d0
add esi, eax
cmp byte [esp + 0x3b], 0
mov ecx, dword [esp + 0x24]
je 0x6b411500
add esi, 2
test ebx, ebx
je 0x6b4113d5
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0x6b5c83ce
call sym._fwrite
mov ecx, dword [esp + 0x24]
cmp eax, 1
je 0x6b411508
lea esi, [esi]
mov esi, 0xffffffff
mov eax, dword [esp + 0x4c]
xor eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
jne 0x6b4116ef
add esp, 0x5c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [edx - 1]
cmp eax, 0x1d
ja 0x6b411430
movsx ecx, byte [edx + 0x6b5c83e4]
mov eax, ecx
cmp cl, 0xff
je 0x6b411430
test ebp, 0x10
je 0x6b41135c
or eax, 8
test ecx, ecx
mov ecx, 1
movsx eax, al
cmovne ecx, eax
jmp 0x6b41135c
test ebp, 0x100
je 0x6b41134c
test ebx, ebx
je 0x6b4115f0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0x6b5c83cc
call sym._fwrite
cmp eax, 1
jne 0x6b4113d0
and ebp, 0x200
jne 0x6b4116f4
mov eax, dword [edi]
mov ebp, dword [edi + 8]
lea edi, [esp + 0x4a]
mov dword [esp + 0x24], eax
add eax, ebp
cmp eax, ebp
je 0x6b4115fe
mov dword [esp + 0x28], esi
mov esi, ebp
mov ebp, edi
mov edi, ebx
mov ebx, eax
jmp 0x6b4114ab
add esi, 1
cmp ebx, esi
je 0x6b4116b0
movzx eax, byte [esi]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 2
mov ecx, eax
mov dword [esp + 4], 1
and eax, 0xf
shr cl, 4
mov dword [esp], ebp
movzx eax, byte [eax + 0x6b5c83d0]
movzx ecx, cl
movzx ecx, byte [ecx + 0x6b5c83d0]
mov byte [esp + 0x4b], al
mov byte [esp + 0x4a], cl
call sym._fwrite
cmp eax, 2
jne 0x6b4113d0
jmp 0x6b4114a0
test ebx, ebx
je 0x6b4113d5
mov eax, dword [edi + 8]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], ebp
mov edx, dword [edi]
call sym._do_buf.constprop.0
test eax, eax
js 0x6b4113d0
cmp byte [esp + 0x3b], 0
je 0x6b4113d5
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0x6b5c83ce
call sym._fwrite
cmp eax, 1
je 0x6b4113d5
jmp 0x6b4113d0
mov dword [esp], edx
mov dword [esp + 0x28], edx
call sym.libcrypto_1_1.dll_ASN1_tag2str
mov dword [esp], eax
mov dword [esp + 0x24], eax
call sym._strlen
test ebx, ebx
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov esi, eax
je 0x6b4115df
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ecx
mov dword [esp + 0x24], edx
call sym._fwrite
cmp esi, eax
jne 0x6b4113d0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0x6b5c83ca
call sym._fwrite
cmp eax, 1
jne 0x6b4113d0
mov edx, dword [esp + 0x24]
add esi, 1
jmp 0x6b411334
and ebp, 0x200
jne 0x6b411620
mov eax, dword [edi]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x24]
add eax, eax
js 0x6b4113d0
add eax, 1
test eax, eax
js 0x6b4113d0
add esi, eax
jmp 0x6b4113d5
lea ebx, [esp + 0x40]
mov eax, dword [edi + 4]
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], edi
call sym.libcrypto_1_1.dll_i2d_ASN1_TYPE
mov dword [esp + 8], 0x11b
mov dword [esp + 4], str.crypto_asn1_a_strex.c
mov dword [esp], eax
mov dword [esp + 0x28], eax
call sym.libcrypto_1_1.dll_CRYPTO_malloc
mov dword [esp + 0x24], eax
test eax, eax
je 0x6b4116b9
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x3c]
mov dword [esp + 4], eax
mov dword [esp], ebx
call sym.libcrypto_1_1.dll_i2d_ASN1_TYPE
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x28]
mov dword [esp + 8], 0x122
mov dword [esp + 4], str.crypto_asn1_a_strex.c
mov dword [esp], eax
add ebx, ebx
call sym.libcrypto_1_1.dll_CRYPTO_free
test ebx, ebx
js 0x6b4113d0
lea eax, [ebx + 1]
jmp 0x6b41160d
mov esi, dword [esp + 0x28]
jmp 0x6b4115fe
mov dword [esp + 0x10], 0x11c
mov esi, 0xffffffff
mov dword [esp + 0xc], str.crypto_asn1_a_strex.c
mov dword [esp + 8], 0x41
mov dword [esp + 4], 0x7d
mov dword [esp], 0xd
call sym.libcrypto_1_1.dll_ERR_put_error
jmp 0x6b4113d5
call sym.___stack_chk_fail
mov eax, dword [edi + 4]
mov dword [esp + 0x44], edi
lea edi, [esp + 0x40]
mov dword [esp + 4], 0
mov dword [esp], edi
mov dword [esp + 0x40], eax
call sym.libcrypto_1_1.dll_i2d_ASN1_TYPE
mov dword [esp + 8], 0x11b
mov dword [esp + 4], str.crypto_asn1_a_strex.c
mov dword [esp], eax
mov dword [esp + 0x28], eax
call sym.libcrypto_1_1.dll_CRYPTO_malloc
mov dword [esp + 0x24], eax
test eax, eax
je 0x6b4116b9
mov dword [esp + 0x3c], eax
mov ebp, eax
lea eax, [esp + 0x3c]
mov dword [esp], edi
lea edi, [esp + 0x4a]
mov dword [esp + 4], eax
call sym.libcrypto_1_1.dll_i2d_ASN1_TYPE
mov eax, dword [esp + 0x28]
add eax, ebp
cmp eax, ebp
je 0x6b411677
mov dword [esp + 0x2c], esi
mov esi, ebp
mov ebp, edi
mov edi, ebx
mov ebx, eax
lea esi, [esi]
nop
movzx eax, byte [esi]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 2
mov ecx, eax
mov dword [esp + 4], 1
and eax, 0xf
shr cl, 4
mov dword [esp], ebp
movzx eax, byte [eax + 0x6b5c83d0]
movzx ecx, cl
movzx ecx, byte [ecx + 0x6b5c83d0]
mov byte [esp + 0x4b], al
mov byte [esp + 0x4a], cl
call sym._fwrite
cmp eax, 2
je 0x6b4117e0
mov eax, dword [esp + 0x24]
mov dword [esp + 8], 0x122
mov dword [esp + 4], str.crypto_asn1_a_strex.c
mov dword [esp], eax
call sym.libcrypto_1_1.dll_CRYPTO_free
jmp 0x6b4113d0
add esi, 1
cmp ebx, esi
jne 0x6b411770
mov esi, dword [esp + 0x2c]
jmp 0x6b411677