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

Disassembly:
sub esp, 0x474
mov eax, dword [0x597f98]
xor eax, esp
mov dword [esp + 0x470], eax
mov eax, dword [0x599104]
test eax, eax
push ebx
mov ebx, dword [esp + 0x484]
push edi
mov edi, dword [esp + 0x484]
je 0x48f087
push ebp
push esi
push 0x5990e8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x58cf74], 0xffffffff
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x48ee43
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.00524440
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x78]
add esp, 0x24
push 0
lea edx, [esp + 0x14]
push edx
mov edx, dword [0x58cf74]
push eax
push ecx
push edx
call ebp
push ebx
push edi
lea eax, [esp + 0x54]
push eax
call fcn.00524400
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x54]
xor esi, esi
cmp eax, 2
jl 0x48ee01
cmp byte [ecx + eax - 2], 0xd
je 0x48ee01
cmp byte [ecx + eax - 1], 0xa
jne 0x48ee01
sub eax, 1
mov dword [esp + 0x4c], eax
mov esi, 1
push 0
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [0x58cf74]
push ecx
push eax
call ebp
test esi, esi
je 0x48ee2d
mov edx, dword [0x58cf74]
push 0
lea ecx, [esp + 0x14]
push ecx
push 2
push 0x55165c
push edx
call ebp
mov eax, dword [0x58cf74]
push eax
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
lea ecx, [esp + 0x4c]
push ecx
call fcn.00401230
cmp dword [0x599100], 0
je 0x48f07a
lea edx, [esp + 0x15c]
push edx
call fcn.00401210
push ebx
push edi
lea eax, [esp + 0x164]
push eax
call fcn.00524400
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 0x48eff6
lea ecx, [esp + 0x26c]
push ecx
call fcn.00401210
mov edx, dword [esp + 0x164]
push edx
lea eax, [esp + 0x270]
push eax
call fcn.00527770
mov edi, dword [esp + 0x274]
cmp word [edi], 0
je 0x48efe7
mov edx, dword [esp + 0x488]
mov ecx, edx
and ecx, 0xff000000
mov dword [esp + 0x20], ecx
jmp 0x48eeeb
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 0x48ef2a
lea ecx, [ecx]
cmp ax, 0xd
jne 0x48ef18
cmp word [edi + 2], 0xa
jne 0x48ef1e
mov esi, edi
sub esi, ebx
sar esi, 1
add edi, 4
jmp 0x48ef3b
cmp ax, 0xa
je 0x48ef32
movzx eax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x48ef00
mov esi, edi
sub esi, ebx
sar esi, 1
jmp 0x48ef43
mov esi, edi
sub esi, ebx
sar esi, 1
add edi, 2
mov dword [esp + 0x10], 1
test ecx, ecx
je 0x48ef9c
test edx, 0xff0000
mov ebp, 8
je 0x48ef59
mov ebp, 0xc
test edx, 0xff00
je 0x48ef64
or ebp, 2
test dl, dl
je 0x48ef6b
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 0x48ef90
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 [0x598d60]
push ebx
mov ebx, dword [esp + 0x24]
push ebx
call esi
cmp dword [esp + 0x10], 0
je 0x48efca
push 0
lea eax, [esp + 0x1c]
push eax
push 2
push 0x558a4c
push ebx
call esi
cmp dword [esp + 0x20], 0
je 0x48efdd
mov ecx, dword [esp + 0x1c]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp word [edi], 0
jne 0x48eee0
lea edx, [esp + 0x26c]
push edx
call fcn.00401230
jmp 0x48f06d
mov esi, dword [esp + 0x164]
cmp byte [esi], 0
je 0x48f06d
mov al, byte [esi]
xor edi, edi
test al, al
mov ecx, esi
je 0x48f036
lea esp, [esp]
cmp al, 0xd
jne 0x48f028
cmp byte [esi + 1], 0xa
jne 0x48f02c
mov eax, esi
sub eax, ecx
mov edi, 1
add esi, 2
jmp 0x48f047
cmp al, 0xa
je 0x48f03c
mov al, byte [esi + 1]
add esi, 1
test al, al
jne 0x48f010
mov eax, esi
sub eax, ecx
jmp 0x48f047
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 0x48f068
push 0
lea eax, [esp + 0x1c]
push eax
push 2
push 0x55165c
push ebx
call ebp
cmp byte [esi], 0
jne 0x48f002
lea ecx, [esp + 0x15c]
push ecx
call fcn.00401230
push 0x5990e8
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.005498cd
add esp, 0x474
ret 0xc