Function at 0x540280
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xe7c
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov ecx, 0x1e3
xor eax, eax
lea edi, [esp + 0x6fd]
mov byte [esp + 0x6fc], 0
mov ebx, dword [esp + 0xe90]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
test ebx, ebx
stosb byte es:[edi], al
je 0x54094c
mov esi, dword [esp + 0xe94]
test esi, esi
je 0x54094c
mov eax, dword [esi + 0x14]
mov ecx, dword [ebx + 0x2c]
lea edi, [ebx + 0x20]
push eax
push ecx
push edi
push 0x5965b8
push str._s_testerhistory_s_d__d.fxt
lea edx, [esp + 0x304]
push 0x103
push edx
mov dword [esp + 0x2c], edi
call dword [sym.imp.MSVCRT.dll__snprintf]
mov eax, dword [esi + 0x18]
add esp, 0x1c
test eax, eax
jne 0x5405ee
lea eax, [esp + 0x2f0]
push 0x581660
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp + 0x2d8], eax
test eax, eax
je 0x5405bc
mov ecx, 0xc1
xor eax, eax
lea edi, [esp + 0x3f8]
mov word [esp + 0x3f4], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x3f4]
push ecx
mov ecx, 0x593d48
call fcn.0042f040
mov edx, dword [ebp + 0x2d8]
lea eax, [esp + 0x18]
push edx
push 1
push 0x2d8
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
jne 0x5405bc
cmp dword [esp + 0x18], 0x195
jne 0x5405bc
mov ecx, dword [esp + 0xec]
mov edx, esi
cmp ecx, dword [edx + 0x14]
jne 0x5405bc
mov eax, dword [esp + 0xe8]
mov ecx, dword [ebx + 0x2c]
cmp eax, ecx
jne 0x5405bc
mov esi, dword [esp + 0x10]
lea eax, [esp + 0xdc]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x5403d6
test cl, cl
je 0x5403d2
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x5403d6
add eax, 2
add esi, 2
test cl, cl
jne 0x5403b2
xor eax, eax
jmp 0x5403db
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x5405bc
lea esi, [esp + 0x410]
lea eax, [esp + 0x5c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x540412
test cl, cl
je 0x54040e
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x540412
add eax, 2
add esi, 2
test cl, cl
jne 0x5403ee
xor eax, eax
jmp 0x540417
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x5405bc
mov ecx, dword [esp + 0x1f0]
mov edx, dword [esp + 0xe94]
test ecx, ecx
je 0x540440
mov eax, dword [edx + 0x24]
test eax, eax
je 0x540440
cmp ecx, eax
jg 0x5405bc
mov ecx, dword [esp + 0x1f4]
test ecx, ecx
je 0x54045a
mov eax, dword [edx + 0x28]
test eax, eax
je 0x54045a
cmp ecx, eax
jl 0x5405bc
cmp dword [esp + 0xf0], 0x64
jle 0x540513
fld qword [esp + 0x100]
fcomp qword [0x565ac0]
fnstsw ax
test ah, 1
jne 0x540513
mov eax, dword [esp + 0x114]
test eax, eax
jl 0x540513
cmp eax, 0x186a0
jg 0x540513
mov eax, dword [esp + 0x118]
test eax, eax
jl 0x540513
cmp eax, 8
jg 0x540513
mov eax, dword [esp + 0x128]
test eax, eax
jl 0x540513
mov eax, dword [esp + 0x130]
test eax, eax
jle 0x540513
mov eax, dword [esp + 0x134]
test eax, eax
jle 0x540513
fld qword [esp + 0x1a8]
fcomp qword [0x565ac0]
fnstsw ax
test ah, 0x41
jne 0x540513
mov al, byte [esp + 0x108]
test al, al
je 0x540513
mov al, byte [esp + 0x1b0]
test al, al
je 0x540513
mov eax, dword [esp + 0x17c]
test eax, eax
jle 0x540513
cmp eax, 0x1f4
jg 0x540513
mov eax, dword [esp + 0x178]
test eax, eax
jl 0x540513
cmp eax, 6
jle 0x54051a
mov dword [edx + 0x18], 1
mov eax, dword [edx + 0x18]
test eax, eax
jne 0x5405bc
mov eax, dword [ebp + 0x2d8]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll__filelength]
mov edx, eax
mov eax, 0x4ec4ec4f
sub edx, 0x2d8
mov ecx, 0xb6
mul edx
lea esi, [esp + 0x1c]
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0xe9c]
mov eax, dword [ebp + 0xd8]
shr edx, 4
mov dword [ebp + 0x2f4], edx
mov dword [ecx], eax
mov eax, dword [esp + 0xea0]
mov edx, dword [ebp + 0x2f4]
mov dword [eax], edx
mov eax, dword [esp + 0xea4]
mov ecx, dword [ebp + 0xe8]
mov dword [eax], ecx
mov edx, dword [ebp + 0xec]
mov dword [eax + 4], edx
mov eax, dword [ebp + 0x2d8]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 8
mov dword [ebp + 0x2d8], 0
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe7c
ret 0x14
mov eax, dword [ebp + 0x2d8]
test eax, eax
je 0x5405da
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [ebp + 0x2d8], 0
mov ecx, dword [esp + 0xe94]
mov edi, dword [esp + 0x10]
mov esi, ecx
mov dword [ecx + 0x18], 1
lea edx, [esp + 0x2f0]
push 0x584dc4
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
xor ecx, ecx
add esp, 8
cmp eax, ecx
mov dword [ebp + 0x2d8], eax
jne 0x540633
push str.TestGenerator:_internal_error_because_the_file_not_opened
push 1
push 0x5960a0
call fcn.0046b660
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe7c
ret 0x14
mov dword [ebp + 0x2f4], ecx
mov dword [ebp + 0x2e8], ecx
mov dword [ebp + 0x2e4], ecx
lea eax, [esp + 0x6fc]
mov dword [ebp + 0x1b90], ecx
mov ecx, dword [0x5a1a04]
push eax
push edi
call fcn.0051b610
test eax, eax
jne 0x54069d
mov ecx, 0x1e4
lea edi, [esp + 0x6fc]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x10]
push 0xb
lea edx, [esp + 0x700]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_strncpy]
mov eax, dword [ebx + 0x30]
add esp, 0xc
mov byte [esp + 0x707], 0
mov dword [esp + 0x764], eax
jmp 0x5406a7
mov ecx, dword [esp + 0x764]
mov dword [ebx + 0x30], ecx
mov eax, dword [ebx + 0x2c]
lea edx, [esp + 0x14]
push 1
push edx
push 0
lea ecx, [esp + 0x708]
push eax
push ecx
mov ecx, dword [0x596208]
mov dword [esp + 0x28], 0
call fcn.00475c90
test eax, eax
je 0x54094c
mov eax, dword [esp + 0x14]
test eax, eax
je 0x540781
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x7d0
call edi
mov edx, dword [ebx + 0x2c]
mov eax, dword [esp + 0x10]
mov ecx, dword [0x596208]
push 0
push edx
push eax
call fcn.00476eb0
test eax, eax
je 0x540781
mov eax, dword [esi + 0x20]
mov ecx, 1
test eax, eax
je 0x54073d
mov ecx, dword [esi + 0x24]
test ecx, ecx
je 0x540738
mov edx, dword [ebx + 0x2c]
mov eax, edx
shl eax, 4
sub eax, edx
neg eax
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
shl edx, 4
add ecx, edx
test ecx, ecx
jg 0x54073d
mov ecx, 1
mov eax, dword [ebx + 0x2c]
push 1
push 0
push ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, dword [0x596208]
call fcn.00476bf0
xor esi, esi
mov edx, dword [ebx + 0x2c]
mov eax, dword [esp + 0x10]
mov ecx, dword [0x596208]
push edx
push eax
call fcn.00476f40
test eax, eax
jne 0x54077a
push 0x64
call edi
inc esi
cmp esi, 0x64
jl 0x540758
mov esi, dword [esp + 0xe94]
mov eax, dword [esi + 0x20]
test eax, eax
je 0x5407a3
mov ecx, dword [esi + 0x28]
mov edx, dword [esi + 0x24]
push 0x3e8
push ecx
mov ecx, dword [0x596208]
push edx
push ebx
call fcn.00476ab0
jmp 0x5407b1
mov ecx, dword [0x596208]
push 0
push ebx
call fcn.004768d0
test eax, eax
je 0x54092f
mov eax, dword [ebx + 8]
cmp eax, 1
jl 0x54092f
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x54092f
cmp eax, 0x64
jge 0x540802
mov ecx, dword [esp + 0x10]
push eax
mov eax, dword [ebx + 0x2c]
push eax
push ecx
push str.TestGenerator:_deficient_data__s_d___d_rate_records_
push 1
push 0x5960a0
call fcn.0046b660
add esp, 0x18
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe7c
ret 0x14
mov edi, dword [esp + 0xe94]
lea esi, [eax + eax]
mov ecx, dword [edi + 0x14]
cmp ecx, 2
je 0x540839
cmp ecx, 1
jne 0x54081e
mov esi, 0xc
test ecx, ecx
jne 0x540827
mov esi, 0x18
imul eax, esi
mov esi, eax
cmp esi, 0x186a0
jle 0x540839
mov esi, 0x186a0
mov eax, dword [ebp + 0x2dc]
test eax, eax
je 0x540858
cmp dword [ebp + 0x2ec], esi
jge 0x540899
test eax, eax
je 0x540858
push eax
call fcn.004c2eb0
add esp, 4
lea edx, [esi + esi*2]
mov dword [ebp + 0x2ec], esi
lea eax, [esi + edx*4]
shl eax, 2
push eax
call fcn.004c2e90
add esp, 4
mov dword [ebp + 0x2dc], eax
test eax, eax
jne 0x540899
mov edx, dword [esp + 0x10]
mov dword [ebp + 0x2ec], eax
mov dword [ebp + 0x2e8], eax
mov ecx, dword [ebx + 0x2c]
push ecx
push edx
push str.TestGenerator:_not_enough_memory_for__s_d
jmp 0x54093d
mov ecx, dword [edi + 0x14]
xor eax, eax
sub ecx, eax
je 0x5408d4
dec ecx
je 0x5408ba
dec ecx
jne 0x5408ec
mov eax, dword [edi + 0x28]
mov ecx, dword [edi + 0x24]
push eax
push ecx
push ebx
mov ecx, ebp
call fcn.00542c00
jmp 0x5408ec
mov edx, dword [edi + 0x28]
mov eax, dword [edi + 0x24]
push edx
lea ecx, [esp + 0x700]
push eax
push ecx
push ebx
mov ecx, ebp
call fcn.00541610
jmp 0x5408ec
mov edx, dword [edi + 0x28]
mov eax, dword [edi + 0x24]
push edx
lea ecx, [esp + 0x700]
push eax
push ecx
push ebx
mov ecx, ebp
call fcn.00543710
mov ecx, dword [esp + 0xe98]
mov edx, dword [ebp + 0xd8]
pop edi
pop esi
mov dword [ecx], edx
mov ecx, dword [esp + 0xe94]
mov edx, dword [ebp + 0x2f4]
mov dword [ecx], edx
mov ecx, dword [esp + 0xe98]
mov edx, dword [ebp + 0xe8]
mov dword [ecx], edx
mov edx, dword [ebp + 0xec]
pop ebp
mov dword [ecx + 4], edx
pop ebx
add esp, 0xe7c
ret 0x14
mov eax, dword [ebx + 0x2c]
mov ecx, dword [esp + 0x10]
push eax
push ecx
push str.TestGenerator:_no_history_data__s_d
push 1
push 0x5960a0
call fcn.0046b660
add esp, 0x14
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe7c
ret 0x14