Function at 0x404820
Capabilities:
Read file on windows

Disassembly:
mov eax, 0xdbd3c
call fcn.00409fe0
mov eax, dword [esp + 0xdbd40]
push ebx
push ebp
mov ebp, ecx
lea ecx, [eax + eax*4]
push esi
push edi
lea edx, [eax + ecx*2]
mov eax, dword [0x40e438]
shl edx, 4
mov ecx, dword [eax + 0x68]
cmp byte [ecx + edx + 0xac], 1
jne 0x404cce
mov ecx, dword [ebp + 0x3c]
cmp ecx, 3
jle 0x404888
xor eax, eax
push 0x19
mov dword [ebp + 0x3c], eax
mov dword [ebp + 0x1448], eax
mov edx, dword [0x40e438]
mov eax, dword [edx + 0x20]
push eax
call dword [sym.imp.USER32.dll_KillTimer]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdbd3c
ret 4
mov eax, dword [ebp + 0x1448]
cmp eax, 0x65
je 0x404cca
cmp eax, 0x66
je 0x404cca
cmp eax, 0x67
je 0x404cca
cmp eax, 0x68
je 0x404cca
cmp eax, 0x6c
je 0x404cca
lea ecx, [esp + 0x24]
push ecx
call dword [sym.imp.MSVCRT.dll_time]
mov eax, dword [ebp + 0x4230]
add esp, 4
cmp eax, 1
jne 0x4048dc
sub dword [esp + 0x24], 0x15180
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.MSVCRT.dll_localtime]
mov esi, eax
mov eax, dword [0x40e438]
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [eax + 0x14c]
mov eax, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
push ecx
mov ecx, dword [esi + 0x14]
inc eax
push edx
add ecx, 0x76c
push eax
push ecx
lea edx, [esp + 0xc0]
push str._d_02d_02d._s
push edx
call ebx
mov ecx, dword [esi + 0x14]
lea eax, [esp + 0xc8]
add ecx, 0x76c
push eax
push ecx
push str.d:_System_Log
lea edx, [esp + 0x154]
push str._s__d__s
push edx
call ebx
lea eax, [esp + 0x15c]
push 0x40d7e0
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x38
test esi, esi
mov dword [esp + 0x18], esi
je 0x404cce
mov ecx, dword [ebp + 0x3c]
lea edx, [esp + 0xac]
push ecx
push edx
lea eax, [esp + 0x34]
push str.MGR_PC:_Make_LOG_File_:__s__d_
push eax
call ebx
add esp, 0x10
lea ecx, [esp + 0x2c]
push ecx
mov ecx, ebp
call fcn.00405820
push esi
mov ecx, 0x36ee8
xor eax, eax
lea edi, [esp + 0x1b0]
push 0xdbba0
lea edx, [esp + 0x1b4]
push 1
push edx
rep stosd dword es:[edi], eax
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, eax
mov eax, dword [esp + 0x28]
push eax
mov dword [esp + 0x3c], esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
cmp esi, 0x64
jge 0x4049fe
lea ecx, [esp + 0xac]
push esi
push ecx
lea edx, [esp + 0x34]
push str.MGR_PC:_Make_LOG_File_Read_ERROR_:__s__d_
push edx
call ebx
add esp, 0x10
lea eax, [esp + 0x2c]
mov ecx, ebp
push eax
call fcn.00405820
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdbd3c
ret 4
mov edi, dword [ebp + 4]
mov eax, esi
cdq
idiv edi
mov ecx, eax
test ecx, ecx
mov dword [ebp + 0x2c], ecx
jle 0x404a23
mov edx, ecx
mov eax, esi
imul edx, edi
mov edi, edx
cdq
idiv edi
test edx, edx
jle 0x404a23
inc ecx
mov dword [ebp + 0x2c], ecx
mov edi, dword [ebp + 0x2c]
push esi
inc edi
lea ecx, [esp + 0x30]
mov eax, edi
mov dword [ebp + 0x2c], edi
push eax
push str.MGR_PC:_Make_LOG_Total_Packet_:__d__d
push ecx
call ebx
add esp, 0x10
lea edx, [esp + 0x2c]
mov ecx, ebp
push edx
call fcn.00405820
mov eax, dword [ebp + 0x2c]
mov ecx, dword [ebp + 0x10]
cmp eax, ecx
jl 0x404a70
push esi
push eax
lea eax, [esp + 0x34]
push str.MGR_PC:_Make_Run_LOG_Size_ERROR_:__d__d
push eax
call ebx
add esp, 0x10
lea ecx, [esp + 0x2c]
push ecx
mov ecx, ebp
call fcn.00405820
mov ecx, dword [ebp + 0x20]
mov edi, dword [ebp + 4]
add ecx, edi
mov edi, dword [ebp + 0x420c]
imul ecx, dword [ebp + 0x2c]
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0xdbd50]
mov ecx, dword [ebp + 0x420c]
push eax
push 0x44
push ecx
mov ecx, ebp
call fcn.00404e20
push 0
lea edx, [esp + 0x14]
push str._04d
push edx
call ebx
mov eax, dword [ebp + 0x420c]
mov ecx, dword [esp + 0x1c]
push esi
lea edx, [esp + 0x20]
push str._07d
push edx
mov dword [eax + 0x14], ecx
call ebx
mov eax, dword [ebp + 0x420c]
mov ecx, dword [esp + 0x28]
add eax, 0x1e
lea edi, [esp + 0xc4]
lea esi, [esp + 0xc4]
mov dword [eax], ecx
mov dx, word [esp + 0x2c]
mov word [eax + 4], dx
mov cl, byte [esp + 0x2e]
mov byte [eax + 6], cl
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [ebp + 0x420c]
not ecx
dec ecx
add edi, 0x25
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0x420c]
or ecx, 0xffffffff
add edi, 0x1e
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x28]
mov edi, ecx
push edi
push str._07d
push eax
mov dword [esp + 0x3c], edi
call ebx
mov ecx, dword [ebp + 0x420c]
mov edx, dword [esp + 0x34]
add ecx, 0xd
mov esi, 1
add esp, 0x24
mov dword [esp + 0x1c], esi
mov dword [ecx], edx
mov ax, word [esp + 0x14]
mov word [ecx + 4], ax
mov dl, byte [esp + 0x16]
mov byte [ecx + 6], dl
mov eax, dword [ebp + 0x2c]
cmp eax, esi
jl 0x404c68
mov edi, 0xbd6
mov dword [esp + 0x20], edi
jmp 0x404b8d
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0xdbd50]
mov edx, dword [ebp + 0x420c]
mov ecx, edi
push eax
add ecx, edx
push 0x44
push ecx
mov ecx, ebp
call fcn.00404e20
push esi
lea edx, [esp + 0x14]
push str._04d
push edx
call ebx
mov eax, dword [ebp + 0x420c]
mov ecx, dword [esp + 0x1c]
add esp, 0xc
mov dword [edi + eax + 0x14], ecx
mov edx, dword [ebp + 0x2c]
dec edx
cmp esi, edx
jne 0x404be3
mov eax, dword [esp + 0x28]
mov ecx, dword [ebp + 4]
cdq
idiv ecx
mov esi, edx
test esi, esi
jne 0x404be6
mov esi, ecx
jmp 0x404be6
mov esi, dword [ebp + 4]
push esi
lea eax, [esp + 0x14]
push str._07d
push eax
call ebx
mov ecx, dword [ebp + 0x420c]
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea edx, [edi + ecx + 0xd]
mov dword [edi + ecx + 0xd], eax
mov cx, word [esp + 0x14]
mov word [edx + 4], cx
mov al, byte [esp + 0x16]
mov ecx, esi
mov byte [edx + 6], al
mov edx, dword [esp + 0x1c]
dec edx
mov eax, dword [ebp + 0x420c]
imul edx, dword [ebp + 4]
lea edi, [edi + eax + 0x1e]
mov eax, dword [esp + 0x1c]
lea esi, [esp + edx + 0x1ac]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x20]
and ecx, 3
inc eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x2c]
add edx, 0xbd6
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
jle 0x404b85
mov edi, dword [esp + 0x18]
mov eax, dword [ebp + 0x20]
mov esi, dword [ebp + 0x420c]
add eax, edi
lea edx, [ebp + 0xc0]
mov ecx, eax
mov edi, edx
mov ebx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0xdbd50]
push ecx
push eax
push edx
mov edx, dword [0x40e438]
lea ecx, [edx + 0x60]
call fcn.004099a0
mov eax, dword [esp + 0x18]
mov ecx, ebp
push eax
push 0x44
push 2
mov dword [ebp + 0x1448], 0x6c
call fcn.00405670
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdbd3c
ret 4
inc ecx
mov dword [ebp + 0x3c], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xdbd3c
ret 4