Function at 0x6b40f6f0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
mov edi, edx
push esi
push ebx
mov ebx, eax
add ebx, edi
sub esp, 0x7c
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0x94]
mov esi, dword [esp + 0x98]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x44], edx
mov eax, dword [esp + 0x90]
mov edx, ecx
and edx, 7
mov dword [esp + 0x38], esi
mov esi, dword [sym.imp.libssp_0.dll___stack_chk_guard]
mov dword [esp + 0x6c], esi
xor esi, esi
mov word [esp + 0x40], ax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], edx
cmp edx, 2
je 0x6b40fc00
cmp edx, 4
jne 0x6b40f757
and edi, 3
jne 0x6b40fd6a
mov edi, dword [esp + 0x28]
xor ebp, ebp
cmp dword [esp + 0x2c], edi
je 0x6b40f985
and eax, 1
and ecx, 8
mov edi, dword [esp + 0x2c]
xor ebp, ebp
mov word [esp + 0x32], ax
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x2c]
movzx esi, word [esp + 0x32]
shl esi, 5
cmp eax, edi
mov eax, 0
cmovne esi, eax
mov eax, dword [esp + 0x24]
cmp eax, 2
je 0x6b40fa90
jg 0x6b40f890
test eax, eax
je 0x6b40fab0
cmp eax, 1
jne 0x6b40f980
movzx eax, byte [edi]
add edi, 1
mov dword [esp + 0x54], eax
cmp dword [esp + 0x28], edi
je 0x6b40f8b0
mov edx, dword [esp + 0x34]
test edx, edx
jne 0x6b40f8ca
cmp eax, 0xffff
ja 0x6b40fae8
cmp eax, 0xff
ja 0x6b40fba0
or si, word [esp + 0x40]
mov byte [esp + 0x53], al
mov edx, esi
test al, al
js 0x6b40fb48
and dx, word [eax + eax + 0x6b5c8420]
test dl, 0x61
je 0x6b40fd60
and edx, 8
jne 0x6b40fca0
mov esi, dword [esp + 0x38]
test esi, esi
je 0x6b40f873
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0x6b5c8396
call sym._fwrite
cmp eax, 1
jne 0x6b40f980
lea eax, [esp + 0x53]
mov dword [esp + 0xc], esi
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._fwrite
cmp eax, 1
jne 0x6b40f980
mov eax, 2
add ebp, eax
lea esi, [esi]
cmp dword [esp + 0x28], edi
jne 0x6b40f77c
jmp 0x6b40f985
cmp dword [esp + 0x24], 4
jne 0x6b40f980
mov eax, dword [edi]
add edi, 4
bswap eax
mov dword [esp + 0x54], eax
cmp dword [esp + 0x28], edi
jne 0x6b40f7ca
mov edx, dword [esp + 0x34]
cmp word [esp + 0x32], 0
mov ecx, 0x40
cmovne esi, ecx
test edx, edx
je 0x6b40f7d6
lea ebx, [esp + 0x5b]
mov dword [esp + 8], eax
mov dword [esp + 4], 6
mov dword [esp], ebx
call sym.libcrypto_1_1.dll_UTF8_putc
test eax, eax
jle 0x6b40f880
or si, word [esp + 0x40]
mov dword [esp + 0x48], edi
mov ecx, esi
mov edx, esi
mov edi, dword [esp + 0x38]
mov word [esp + 0x42], si
and dx, 0x40f
and ecx, 4
lea esi, [ebx + eax]
mov word [esp + 0x4e], dx
mov word [esp + 0x4c], cx
lea esi, [esi]
movzx eax, byte [ebx]
mov byte [esp + 0x53], al
test al, al
js 0x6b40f9c8
movzx ecx, al
movzx edx, word [esp + 0x42]
and dx, word [ecx + ecx + 0x6b5c8420]
test dl, 0x61
je 0x6b40fc48
and edx, 8
je 0x6b40fa30
mov eax, dword [esp + 0x44]
test eax, eax
je 0x6b40f954
mov byte [eax], 1
test edi, edi
je 0x6b40f9a0
lea eax, [esp + 0x53]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._fwrite
cmp eax, 1
je 0x6b40f9a0
lea esi, [esi]
mov ebp, 0xffffffff
mov eax, dword [esp + 0x6c]
xor eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
jne 0x6b40fda0
add esp, 0x7c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 1
add ebx, 1
add ebp, eax
cmp esi, ebx
jne 0x6b40f918
mov edi, dword [esp + 0x48]
cmp dword [esp + 0x28], edi
jne 0x6b40f77c
jmp 0x6b40f985
cmp word [esp + 0x4c], 0
movzx ecx, al
je 0x6b40f954
lea eax, [esp + 0x61]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 0x6b5c8398
mov dword [esp + 4], 0xb
mov dword [esp], eax
call sym.libcrypto_1_1.dll_BIO_snprintf
test edi, edi
je 0x6b40fa24
lea eax, [esp + 0x61]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._fwrite
cmp eax, 3
jne 0x6b40f980
mov eax, 3
jmp 0x6b40f9a5
test edi, edi
je 0x6b40fa86
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], 0x6b5c8396
call sym._fwrite
cmp eax, 1
jne 0x6b40f980
lea eax, [esp + 0x53]
mov dword [esp + 0xc], edi
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._fwrite
cmp eax, 1
jne 0x6b40f980
mov eax, 2
jmp 0x6b40f9a5
movzx eax, word [edi]
add edi, 2
rol ax, 8
movzx eax, ax
mov dword [esp + 0x54], eax
jmp 0x6b40f7c0
mov ebx, dword [esp + 0x3c]
lea eax, [esp + 0x54]
mov dword [esp], edi
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
call sym.libcrypto_1_1.dll_UTF8_getc
test eax, eax
js 0x6b40f980
sub ebx, eax
add edi, eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x3c], ebx
jmp 0x6b40f7c0
lea ebx, [esp + 0x61]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.W_08lX
mov dword [esp + 4], 0xb
mov dword [esp], ebx
call sym.libcrypto_1_1.dll_BIO_snprintf
mov eax, dword [esp + 0x38]
test eax, eax
je 0x6b40fb35
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0xa
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._fwrite
cmp eax, 0xa
jne 0x6b40f980
mov eax, 0xa
add ebp, eax
jmp 0x6b40f880
and edx, 4
test dx, dx
jne 0x6b40fd00
cmp eax, 0x5c
je 0x6b40fcb8
mov eax, dword [esp + 0x38]
test eax, eax
je 0x6b40fb8e
mov dword [esp + 0xc], eax
lea eax, [esp + 0x53]
mov dword [esp + 8], 1
mov dword [esp + 4], 1
mov dword [esp], eax
call sym._fwrite
cmp eax, 1
jne 0x6b40f980
mov eax, 1
add ebp, eax
jmp 0x6b40f880
lea ebx, [esp + 0x61]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.U_04lX
mov dword [esp + 4], 0xb
mov dword [esp], ebx
call sym.libcrypto_1_1.dll_BIO_snprintf
mov eax, dword [esp + 0x38]
test eax, eax
je 0x6b40fbed
mov dword [esp + 0xc], eax
mov dword [esp + 8], 6
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._fwrite
cmp eax, 6
jne 0x6b40f980
mov eax, 6
add ebp, eax
jmp 0x6b40f880
test byte [esp + 0x3c], 1
je 0x6b40f757
mov dword [esp + 0x10], 0xa1
mov ebp, 0xffffffff
mov dword [esp + 0xc], str.crypto_asn1_a_strex.c
mov dword [esp + 8], 0x81
mov dword [esp + 4], 0x8e
mov dword [esp], 0xd
call sym.libcrypto_1_1.dll_ERR_put_error
jmp 0x6b40f985
test dx, 0x406
jne 0x6b40f9d7
cmp al, 0x5c
jne 0x6b40f954
cmp word [esp + 0x4e], 0
je 0x6b40f954
test edi, edi
je 0x6b40fa86
mov dword [esp + 0xc], edi
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 0x6b5c839e
call sym._fwrite
cmp eax, 2
jne 0x6b40f980
jmp 0x6b40fa86
mov eax, dword [esp + 0x44]
test eax, eax
je 0x6b40fb5d
mov byte [eax], 1
jmp 0x6b40fb5d
test si, 0x40f
je 0x6b40fb5d
mov eax, dword [esp + 0x38]
test eax, eax
je 0x6b40f873
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 1
mov dword [esp], 0x6b5c839e
call sym._fwrite
cmp eax, 2
jne 0x6b40f980
jmp 0x6b40f873
lea ebx, [esp + 0x61]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x6b5c8398
mov dword [esp + 4], 0xb
mov dword [esp], ebx
call sym.libcrypto_1_1.dll_BIO_snprintf
mov eax, dword [esp + 0x38]
test eax, eax
je 0x6b40fd4d
mov dword [esp + 0xc], eax
mov dword [esp + 8], 3
mov dword [esp + 4], 1
mov dword [esp], ebx
call sym._fwrite
cmp eax, 3
jne 0x6b40f980
mov eax, 3
add ebp, eax
jmp 0x6b40f880
and dx, 0x406
jmp 0x6b40fb4b
mov dword [esp + 0x10], 0x9b
mov ebp, 0xffffffff
mov dword [esp + 0xc], str.crypto_asn1_a_strex.c
mov dword [esp + 8], 0x85
mov dword [esp + 4], 0x8e
mov dword [esp], 0xd
call sym.libcrypto_1_1.dll_ERR_put_error
jmp 0x6b40f985
call sym.___stack_chk_fail
lea esi, [esi]
lea esi, [esi]