Function at 0x402040
Capabilities:
Accept command line arguments
Read file on windows

Disassembly:
sub esp, 0x758
push ebx
push ebp
push esi
push edi
xor ebx, ebx
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x369]
mov byte [esp + 0x368], bl
push str._error_log_error.htm
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x36c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x368]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
mov esi, eax
push edx
call dword [sym.imp.MSVCRT.dll_time]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.MSVCRT.dll_localtime]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 8
inc edx
add eax, 0x76c
push ecx
push edx
push eax
lea ecx, [esp + esi + 0x374]
push str._dt_04d__02d__02d
push ecx
call ebp
add esi, eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x35]
mov byte [esp + 0x34], bl
add esp, 0x14
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x20]
push 0x104
push edx
push ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov ecx, 0x4f
xor eax, eax
lea edi, [esp + 0x22c]
lea edx, [esp + 0x20]
mov dword [esp + 0x228], ebx
push str.current.ecs
rep stosd dword es:[edi], eax
push edx
push str._s_s
lea eax, [esp + 0x130]
push 0x104
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea ecx, [esp + 0x228]
lea edx, [esp + 0x124]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x402240
cmp dword [esp + 0x248], ebx
jne 0x402182
cmp dword [esp + 0x244], ebx
je 0x402239
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
push 0x80
push 3
push ebx
push 3
lea eax, [esp + 0x138]
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x402240
lea ecx, [esp + 0x18]
push ebx
push ecx
lea edx, [esp + 0x18]
push 8
push edx
push edi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x402240
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x14]
mov eax, edx
mov ecx, edx
sar eax, 0x10
mov edi, eax
mov eax, edx
sar ecx, 0x1f
sar eax, 0x1f
mov eax, dword [esp + 0x10]
mov ebp, edx
mov ecx, 0x10
and edi, 0xff
and ebp, 0xff
call fcn.004024c0
mov ecx, dword [esp + 0x10]
and eax, 0xff
and ecx, 0xff
push ecx
push eax
push ebp
push edi
lea ecx, [esp + esi + 0x378]
push str.ecs_d._d._d._d
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
add esi, eax
jmp 0x402254
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea edx, [esp + esi + 0x368]
push str.ecs0.00.00.00
push edx
call ebp
add esp, 8
add esi, eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x20]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x125]
mov byte [esp + 0x124], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x20]
push str.mee.db
push eax
push str._s_s
lea ecx, [esp + 0x130]
push 0x104
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea edx, [esp + 0x124]
push ebx
push 0x80
push 3
push ebx
push 3
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40237e
lea eax, [esp + 0x18]
push ebx
push eax
lea ecx, [esp + 0x18]
push 8
push ecx
push edi
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40237e
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x14]
mov eax, edx
mov ecx, edx
sar eax, 0x10
mov edi, eax
mov eax, edx
sar ecx, 0x1f
sar eax, 0x1f
mov eax, dword [esp + 0x10]
mov ebp, edx
mov ecx, 0x10
and edi, 0xff
and ebp, 0xff
call fcn.004024c0
mov ecx, dword [esp + 0x10]
and eax, 0xff
and ecx, 0xff
push ecx
push eax
push ebp
push edi
lea ecx, [esp + esi + 0x378]
push str.meedb_d._d._d._d
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x18
add esi, eax
jmp 0x402392
lea edx, [esp + esi + 0x368]
push str.meedb0.00.00.00
push edx
call ebp
add esp, 8
add esi, eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
cmp eax, ebx
je 0x4023af
push eax
lea eax, [esp + esi + 0x36c]
push 0x40433c
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x368]
push ecx
call fcn.004023d0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x758
ret