Function at 0x48ed40
Capabilities:
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x474
mov eax, dword [0x596fb8]
xor eax, esp
mov dword [esp + 0x470], eax
mov eax, dword [0x598124]
test eax, eax
push ebx
mov ebx, dword [esp + 0x484]
push edi
mov edi, dword [esp + 0x484]
je 0x48f0b7
push ebp
push esi
push 0x598108
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x58bf94], 0xffffffff
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x48ee73
lea ecx, [esp + 0x4c]
push ecx
call fcn.00401210
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [esp + 0x32]
movzx ecx, word [esp + 0x30]
movzx edx, word [esp + 0x2e]
push eax
movzx eax, word [esp + 0x30]
push ecx
movzx ecx, word [esp + 0x32]
push edx
movzx edx, word [esp + 0x32]
push eax
movzx eax, word [esp + 0x34]
push ecx
push edx
push eax
lea ecx, [esp + 0x68]
push str._04d__02d__02d__02d:_02d:_02d._03d:
push ecx
call fcn.00524170
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x78]
add esp, 0x24
push 0
lea edx, [esp + 0x14]
push edx
mov edx, dword [0x58bf94]
push eax
push ecx
push edx
call ebp
push ebx
push edi
lea eax, [esp + 0x54]
push eax
call fcn.00524130
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x54]
xor esi, esi
cmp eax, 2
jl 0x48ee31
cmp byte [ecx + eax - 2], 0xd
je 0x48ee31
cmp byte [ecx + eax - 1], 0xa
jne 0x48ee31
sub eax, 1
mov dword [esp + 0x4c], eax
mov esi, 1
push 0
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [0x58bf94]
push ecx
push eax
call ebp
test esi, esi
je 0x48ee5d
mov edx, dword [0x58bf94]
push 0
lea ecx, [esp + 0x14]
push ecx
push 2
push 0x550664
push edx
call ebp
mov eax, dword [0x58bf94]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea ecx, [esp + 0x4c]
push ecx
call fcn.00401230
cmp dword [0x598120], 0
je 0x48f0aa
lea edx, [esp + 0x15c]
push edx
call fcn.00401210
push ebx
push edi
lea eax, [esp + 0x164]
push eax
call fcn.00524130
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileType]
mov ebx, eax
push ebx
mov dword [esp + 0x18], ebx
call esi
push ebx
call esi
cmp eax, 2
jne 0x48f026
lea ecx, [esp + 0x26c]
push ecx
call fcn.00401210
mov edx, dword [esp + 0x164]
push edx
lea eax, [esp + 0x270]
push eax
call fcn.00527550
mov edi, dword [esp + 0x274]
cmp word [edi], 0
je 0x48f017
mov edx, dword [esp + 0x488]
mov ecx, edx
and ecx, 0xff000000
mov dword [esp + 0x20], ecx
jmp 0x48ef1b
mov edx, dword [esp + 0x488]
mov ecx, dword [esp + 0x20]
movzx eax, word [edi]
test ax, ax
mov ebx, edi
mov dword [esp + 0x10], 0
je 0x48ef5a
lea ecx, [ecx]
cmp ax, 0xd
jne 0x48ef48
cmp word [edi + 2], 0xa
jne 0x48ef4e
mov esi, edi
sub esi, ebx
sar esi, 1
add edi, 4
jmp 0x48ef6b
cmp ax, 0xa
je 0x48ef62
movzx eax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x48ef30
mov esi, edi
sub esi, ebx
sar esi, 1
jmp 0x48ef73
mov esi, edi
sub esi, ebx
sar esi, 1
add edi, 2
mov dword [esp + 0x10], 1
test ecx, ecx
je 0x48efcc
test edx, 0xff0000
mov ebp, 8
je 0x48ef89
mov ebp, 0xc
test edx, 0xff00
je 0x48ef94
or ebp, 2
test dl, dl
je 0x48ef9b
or ebp, 1
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x24], 7
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x48efc0
movzx eax, word [esp + 0x3c]
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x14]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
push 0
lea edx, [esp + 0x1c]
push edx
push esi
mov esi, dword [0x597d80]
push ebx
mov ebx, dword [esp + 0x24]
push ebx
call esi
cmp dword [esp + 0x10], 0
je 0x48effa
push 0
lea eax, [esp + 0x1c]
push eax
push 2
push 0x557b1c
push ebx
call esi
cmp dword [esp + 0x20], 0
je 0x48f00d
mov ecx, dword [esp + 0x1c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp word [edi], 0
jne 0x48ef10
lea edx, [esp + 0x26c]
push edx
call fcn.00401230
jmp 0x48f09d
mov esi, dword [esp + 0x164]
cmp byte [esi], 0
je 0x48f09d
mov al, byte [esi]
xor edi, edi
test al, al
mov ecx, esi
je 0x48f066
lea esp, [esp]
cmp al, 0xd
jne 0x48f058
cmp byte [esi + 1], 0xa
jne 0x48f05c
mov eax, esi
sub eax, ecx
mov edi, 1
add esi, 2
jmp 0x48f077
cmp al, 0xa
je 0x48f06c
mov al, byte [esi + 1]
add esi, 1
test al, al
jne 0x48f040
mov eax, esi
sub eax, ecx
jmp 0x48f077
mov eax, esi
mov edi, 1
sub eax, ecx
add esi, edi
push 0
lea edx, [esp + 0x1c]
push edx
push eax
push ecx
push ebx
call ebp
test edi, edi
je 0x48f098
push 0
lea eax, [esp + 0x1c]
push eax
push 2
push 0x550664
push ebx
call ebp
cmp byte [esi], 0
jne 0x48f032
lea ecx, [esp + 0x15c]
push ecx
call fcn.00401230
push 0x598108
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebp
mov ecx, dword [esp + 0x478]
pop edi
pop ebx
xor ecx, esp
call fcn.00549750
add esp, 0x474
ret 0xc