Function at 0x557b00
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [esp + 0x70]
mov ebp, dword [esp + 0x68]
mov esi, dword [esp + 0x6c]
test eax, eax
je 0x557fa2
mov eax, dword [esp + 0x70]
cmp byte [eax], 8
sete al
movzx eax, al
mov dword [esp + 0x2c], eax
mov ebx, dword [0x7437d0]
test ebx, ebx
je 0x557e92
mov dword [esp], ebx
call dbg._gpgrt_flockfile
mov eax, dword [0x743744]
test eax, eax
je 0x557b67
cmp dword [esp + 0x60], 1
je 0x557b67
mov eax, dword [0x7437d0]
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sym.__gpgrt__putc_overflow
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x60]
mov dword [0x743744], 0
mov edx, edi
call dbg.print_prefix
cmp edi, 1
sbb dword [esp + 0x70], 0xffffffff
mov ebx, eax
mov eax, dword [esp + 0x70]
test eax, eax
je 0x557cac
test esi, esi
je 0x557bb5
mov eax, dword [0x7437d0]
mov dword [esp], esi
mov dword [esp + 4], eax
call dbg._gpgrt_fputs_unlocked
mov dword [esp], esi
call sym._strlen
add ebx, eax
mov eax, dword [esp + 0x64]
test eax, eax
je 0x557f60
mov esi, dword [esp + 0x70]
mov dword [esp + 0x68], ebp
jmp 0x557c55
mov ebp, dword [0x74375c]
test ebp, ebp
jne 0x557be3
mov eax, dword [0x743748]
test eax, eax
je 0x557c21
mov eax, 0x743780
mov ebp, dword [eax]
add eax, 4
lea edx, [ebp - 0x1010101]
not ebp
and edx, ebp
and edx, 0x80808080
je 0x557be8
mov ebp, edx
shr ebp, 0x10
test edx, 0x8080
cmove edx, ebp
lea ebp, [eax + 2]
cmovne ebp, eax
mov eax, edx
add al, dl
mov eax, ebp
sbb eax, 0x743783
add eax, 2
mov dword [esp + 8], eax
mov eax, dword [0x7437d0]
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ecx
lea esi, [edi + 1]
mov dword [esp + 0xc], 0x651ead
mov dword [esp + 4], str._s_.s
mov dword [esp], eax
call dbg._gpgrt_fprintf_unlocked
lea edx, [ebx + eax]
test eax, eax
cmovg ebx, edx
mov dword [esp + 4], 0xa
mov dword [esp], esi
call sym._strchr
test eax, eax
mov edi, eax
je 0x557c80
mov ecx, edi
sub ecx, esi
add ecx, 1
cmp dword [esp + 0x70], esi
jne 0x557bd0
xor eax, eax
jmp 0x557c21
mov eax, dword [0x7437d0]
mov dword [esp], esi
mov ebp, dword [esp + 0x68]
mov dword [esp + 4], eax
call dbg._gpgrt_fputs_unlocked
mov dword [esp], esi
call sym._strlen
add ebx, eax
mov eax, dword [esp + 0x70]
cmp byte [eax], 0
jne 0x557e20
test ebp, ebp
je 0x557fb0
mov ecx, dword [0x743744]
test ecx, ecx
jne 0x557e49
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x60]
call dbg.print_prefix
add ebx, eax
mov eax, dword [0x7437d0]
mov dword [esp], 0x65204c
add ebx, 3
mov dword [esp + 4], eax
call dbg._gpgrt_fputs_unlocked
mov eax, dword [0x7437d0]
mov dword [0x743744], 1
add ebp, 1
movsx edx, byte [ebp - 1]
test edx, edx
mov ecx, edx
je 0x557d54
cmp edx, 0x5c
mov dword [0x743744], 1
je 0x557db0
cmp edx, 0xd
je 0x557dd0
cmp edx, 0xa
je 0x557df0
test byte [eax + 2], 1
je 0x557d95
mov esi, dword [eax + 0x10]
cmp esi, dword [eax + 8]
jae 0x557d95
mov edx, dword [eax + 4]
lea edi, [esi + 1]
mov dword [eax + 0x10], edi
mov byte [edx + esi], cl
add ebp, 1
movsx edx, byte [ebp - 1]
add ebx, 1
test edx, edx
mov ecx, edx
jne 0x557d05
mov edx, dword [0x743744]
test edx, edx
jne 0x557f34
cmp dword [esp + 0x60], 5
je 0x55801e
cmp dword [esp + 0x60], 6
je 0x558032
mov dword [esp], eax
call dbg._gpgrt_funlockfile
cmp dword [esp + 0x60], 4
je 0x557e70
add esp, 0x4c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], eax
mov dword [esp], edx
call sym.__gpgrt__putc_overflow
mov eax, dword [0x7437d0]
jmp 0x557d44
mov dword [esp + 4], eax
mov dword [esp], 0x652050
add ebx, 2
call dbg._gpgrt_fputs_unlocked
mov eax, dword [0x7437d0]
jmp 0x557cf8
mov dword [esp + 4], eax
mov dword [esp], 0x652053
add ebx, 2
call dbg._gpgrt_fputs_unlocked
mov eax, dword [0x7437d0]
jmp 0x557cf8
mov dword [esp + 4], eax
mov dword [esp], 0x652056
call dbg._gpgrt_fputs_unlocked
cmp byte [ebp], 0
jne 0x557f03
mov dword [0x743744], 0
mov eax, dword [0x7437d0]
xor ebx, ebx
jmp 0x557cf8
mov dword [esp], eax
call sym._strlen
mov edi, dword [esp + 0x70]
cmp byte [edi + eax - 1], 0xa
je 0x557cac
test ebp, ebp
mov dword [0x743744], 1
je 0x557ff2
mov eax, dword [0x7437d0]
mov dword [esp], 0xa
xor ebx, ebx
mov dword [esp + 4], eax
call sym.__gpgrt__putc_overflow
mov dword [0x743744], 0
jmp 0x557cc2
mov eax, dword [0x743740]
cmp eax, 0x752f
jg 0x557d8b
add eax, 1
mov dword [0x743740], eax
add esp, 0x4c
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [0x743754]
test eax, eax
je 0x557fc1
xor edi, edi
xor ebx, ebx
mov dword [esp], ebx
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0
call sym.__gpgrt_log_set_sink
mov dword [esp], edi
call sym.__gpgrt_free
mov ebx, dword [0x7437d0]
test ebx, ebx
jne 0x557b3a
mov dword [esp], 2
call dword [0x5c044c]
mov dword [esp + 8], 0x27
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.gpgrt_fatal:_failed_to_init_log_stream_n
call sym._fwrite
call dbg._gpgrt_abort
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x60]
call dbg.print_prefix
mov ebx, eax
mov eax, dword [0x7437d0]
mov dword [esp], 0x65204c
add ebx, 3
mov dword [esp + 4], eax
call dbg._gpgrt_fputs_unlocked
mov eax, dword [0x7437d0]
jmp 0x557cf8
mov dword [esp + 4], eax
mov dword [esp], 0xa
xor ebx, ebx
call sym.__gpgrt__putc_overflow
mov dword [0x743744], 0
mov eax, dword [0x7437d0]
jmp 0x557d62
mov eax, dword [esp + 0x74]
mov dword [esp + 4], dbg.fmt_string_filter
mov dword [esp + 0x3c], 0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x70]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x3c]
mov dword [esp + 8], eax
mov eax, dword [0x7437d0]
mov dword [esp], eax
call dbg._gpgrt_vfprintf_unlocked
lea edx, [ebx + eax]
test eax, eax
cmovg ebx, edx
jmp 0x557c9f
mov dword [esp + 0x2c], 0
jmp 0x557b2c
cmp dword [esp + 0x60], 5
je 0x558010
mov eax, dword [0x7437d0]
jmp 0x557d6d
mov dword [esp + 8], str.DefaultLogFile
mov dword [esp + 4], str.SoftwareGNUGnuPG
mov dword [esp], 0
call dbg._gpgrt_w32_reg_query_string
test eax, eax
mov edi, eax
je 0x557e9f
cmp byte [eax], 0
cmovne ebx, eax
jmp 0x557ea3
cmp dword [esp + 0x60], 5
jne 0x557fb7
mov eax, dword [0x7437d0]
mov dword [esp], 0xa
mov dword [esp + 4], eax
call sym.__gpgrt__putc_overflow
jmp 0x558019
cmp dword [0x743744], 0
jne 0x557ff9
mov eax, dword [0x7437d0]
mov dword [esp], eax
call dbg._gpgrt_funlockfile
mov dword [esp], 2
call sym._exit
cmp dword [0x743744], 0
je 0x558050
mov dword [esp + 4], eax
mov dword [esp], 0xa
call sym.__gpgrt__putc_overflow
mov eax, dword [0x7437d0]
mov dword [esp], eax
call dbg._gpgrt_funlockfile
call dbg._gpgrt_abort
lea esi, [esi]