Function at 0x4d5d90
Capabilities:
Access the windows event log
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x208
call fcn.0059eec0
mov eax, dword [0x647f80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
test esi, esi
je 0x4d5e1d
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
je 0x4d5e1d
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
lea eax, [ebp - 0x204]
push 0x200
push eax
call fcn.0044bec0
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.005a859b
add esp, 0x1c
or ecx, 0xffffffff
test eax, eax
cmovs eax, ecx
lea ecx, [ebp - 0x208]
push 0
push ecx
test eax, eax
mov ecx, 0x200
cmovs eax, ecx
push eax
lea eax, [ebp - 0x204]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x4d6031
mov esi, dword [ebp + 8]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4d5e23
sub esi, ecx
lea edi, [esi + 1]
lea eax, [edi + edi]
call fcn.0059eab0
mov ebx, esp
test ebx, ebx
jne 0x4d5e47
mov ebx, str.no_stack_
jmp 0x4d5f9f
push edi
push ebx
push edi
push dword [ebp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x4d5f43
test edi, edi
je 0x4d5f43
cmp edi, 4
jb 0x4d5f2e
mov edx, dword [ebp + 8]
lea ecx, [esi + edx]
cmp ebx, ecx
ja 0x4d5e85
lea ecx, [ebx + esi*2]
cmp ecx, edx
jae 0x4d5f31
cmp edi, 0x20
jb 0x4d5f00
mov edx, dword [ebp + 8]
mov esi, edi
and esi, 0x1f
mov ecx, edi
sub ecx, esi
add edx, 0x10
mov dword [ebp - 0x208], ecx
lea ecx, [ebx + 0x20]
movq xmm0, qword [edx - 0x10]
lea ecx, [ecx + 0x40]
punpcklbw xmm0, xmm0
lea edx, [edx + 0x20]
psraw xmm0, 8
add eax, 0x20
movups xmmword [ecx - 0x60], xmm0
movq xmm0, qword [edx - 0x28]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movups xmmword [ecx - 0x50], xmm0
movq xmm0, qword [edx - 0x20]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movups xmmword [ecx - 0x40], xmm0
movq xmm0, qword [edx - 0x18]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movups xmmword [ecx - 0x30], xmm0
cmp eax, dword [ebp - 0x208]
jb 0x4d5ea2
cmp esi, 4
jb 0x4d5f2a
mov edx, dword [ebp + 8]
mov ecx, edi
and ecx, 0xfffffffc
nop dword [eax + eax]
movd xmm0, dword [eax + edx]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movq qword [ebx + eax*2], xmm0
add eax, 4
cmp eax, ecx
jb 0x4d5f10
cmp eax, edi
jae 0x4d5f43
mov edx, dword [ebp + 8]
movsx cx, byte [eax + edx]
mov word [ebx + eax*2], cx
inc eax
cmp eax, edi
jb 0x4d5f2e
xor edx, edx
jmp 0x4d5f49
xor edx, edx
test edi, edi
je 0x4d5f9f
mov esi, 0x53
nop
cmp word [ebx + edx*2], 0x25
jne case.0x4d5f72.43
lea ecx, [edx + 1]
lea ecx, [ebx + ecx*2]
nop dword [eax]
movzx eax, word [ecx]
add eax, 0xffffffd6
cmp eax, 0x49
ja case.0x4d5f72.43
movzx eax, byte [eax + 0x4d6060]
jmp dword [eax*4 + 0x4d6048]
inc edx
add ecx, 2
jmp 0x4d5f60
mov word [ecx], si
jmp case.0x4d5f72.43
mov eax, 0x73
jmp 0x4d5f97
mov eax, 0x43
jmp 0x4d5f97
mov eax, 0x63
mov word [ecx], ax
inc edx
cmp edx, edi
jb 0x4d5f50
lea eax, [ebp + 0xc]
push eax
push 0
push ebx
lea eax, [ebp - 0x204]
push 0xff
push eax
call fcn.0044bec0
mov ecx, dword [eax]
push dword [eax + 4]
or ecx, 1
push ecx
call fcn.005a861d
add esp, 0x1c
xor eax, eax
mov word [ebp - 6], ax
call fcn.004d5c50
test eax, eax
jle 0x4d601b
push str.OpenSSL
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x4d6031
push 0
lea eax, [ebp - 0x204]
mov dword [ebp - 0x208], eax
lea eax, [ebp - 0x208]
push eax
push 0
push 1
push 0
push 0
push 0
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x4d6031
push 0x10
push str.OpenSSL:_FATAL
lea eax, [ebp - 0x204]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
lea esp, [ebp - 0x214]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0059e4d3
mov esp, ebp
pop ebp
ret