Function at 0x1000ae50
Capabilities:
Read file on windows

Disassembly:
sub esp, 0xa8
mov eax, dword [esp + 0xb0]
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x28], ebx
mov byte [esp + 0x13], bl
mov dword [edi + 8], ebx
mov dword [edi + 0xc], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x18], ebx
jne 0x1000ae9d
push ebx
push 0x17
lea ecx, [edi + 0x10]
call fcn.1000a8a0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xa8
ret 8
mov esi, dword [esp + 0xbc]
cmp esi, ebx
jne 0x1000aec2
push ebx
push 1
lea ecx, [edi + 0x10]
call fcn.1000a8a0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xa8
ret 8
push esi
call dword [sym.imp.MSVCRT.dll__fileno]
push eax
call dword [sym.imp.MSVCRT.dll__filelength]
add esp, 8
cmp eax, 0xffffffff
jne 0x1000aef2
push ebx
push 2
lea ecx, [edi + 0x10]
call fcn.1000a8a0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xa8
ret 8
mov ebp, dword [sym.imp.MSVCRT.dll_fscanf]
mov ecx, dword [esp + 0x28]
push esi
inc ecx
mov dword [esp + 0x2c], ecx
call dword [sym.imp.MSVCRT.dll_getc]
add esp, 4
cmp eax, 0xd
je 0x1000af15
cmp eax, 0xa
jne 0x1000af2e
push esi
call dword [sym.imp.MSVCRT.dll_getc]
add esp, 4
cmp eax, 0xa
jne 0x1000af2e
push esi
call dword [sym.imp.MSVCRT.dll_getc]
add esp, 4
cmp eax, 0x53
jne 0x1000b1f4
mov ebx, 1
push esi
push ebx
lea eax, [esp + 0x1a]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_fread]
lea ecx, [esp + 0x24]
push ecx
push 0x10020c18
push esi
call ebp
movsx eax, byte [esp + 0x2e]
mov edx, dword [esp + 0x30]
add eax, 0xffffffd0
add esp, 0x1c
cmp eax, 9
mov dword [esp + 0x20], edx
mov dword [esp + 0x18], 0
ja case.0x1000af7b.52
jmp dword [eax*4 + 0x1000b2c0]
lea eax, [esp + 0x18]
push eax
push 0x10020c14
push esi
call ebp
mov eax, dword [esp + 0x24]
add esp, 0xc
test eax, eax
je 0x1000afa6
push 0
push 0x15
lea ecx, [edi + 0x10]
call fcn.1000a8a0
mov eax, dword [esp + 0x14]
sub eax, 3
jmp 0x1000b0bd
lea ecx, [esp + 0x18]
push ecx
push 0x10020c14
push esi
call ebp
mov dl, byte [esp + 0x1e]
mov eax, dword [esp + 0x20]
add esp, 0xc
mov byte [esp + 0x13], dl
sub eax, 3
jmp 0x1000b0bd
lea eax, [esp + 0x18]
push eax
push 0x10020c70
push esi
call ebp
mov cl, byte [esp + 0x1e]
mov eax, dword [esp + 0x20]
add esp, 0xc
mov byte [esp + 0x13], cl
sub eax, 4
jmp 0x1000b0bd
lea edx, [esp + 0x18]
push edx
push 0x10020ba4
push esi
call ebp
mov al, byte [esp + 0x1e]
add esp, 0xc
mov byte [esp + 0x13], al
jmp 0x1000b0b6
lea ecx, [esp + 0x18]
push ecx
push 0x10020c14
push esi
call ebp
mov al, byte [esp + 0x1f]
mov edx, dword [esp + 0x24]
add esp, 0xc
cmp al, 0x31
mov dword [edi + 0xc], edx
mov dword [esp + 0x24], ebx
je 0x1000b046
push 0
push 0x14
lea ecx, [edi + 0x10]
call fcn.1000a8a0
mov eax, dword [esp + 0x14]
sub eax, 3
jmp 0x1000b0bd
lea eax, [esp + 0x18]
push eax
push 0x10020c70
push esi
call ebp
mov al, byte [esp + 0x1f]
mov ecx, dword [esp + 0x24]
add esp, 0xc
cmp al, 0x32
mov dword [edi + 0xc], ecx
mov dword [esp + 0x24], ebx
je 0x1000b07e
push 0
push 0x14
lea ecx, [edi + 0x10]
call fcn.1000a8a0
mov eax, dword [esp + 0x14]
sub eax, 4
jmp 0x1000b0bd
lea edx, [esp + 0x18]
push edx
push 0x10020ba4
push esi
call ebp
mov eax, dword [esp + 0x24]
add esp, 0xc
mov dword [edi + 0xc], eax
mov al, byte [esp + 0x13]
cmp al, 0x33
mov dword [esp + 0x24], ebx
je 0x1000b0b6
push 0
push 0x14
lea ecx, [edi + 0x10]
call fcn.1000a8a0
mov eax, dword [esp + 0x14]
sub eax, 5
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x19]
mov edx, dword [esp + 0x1a]
and eax, 0xff
and ecx, 0xff
and edx, 0xff
add eax, ecx
mov ecx, dword [esp + 0x1b]
add eax, edx
mov edx, dword [esp + 0x20]
and ecx, 0xff
add ecx, edx
lea ebx, [ecx + eax]
mov al, byte [esp + 0x12]
cmp al, 0x30
je 0x1000b10d
cmp al, 0x31
je 0x1000b10d
cmp al, 0x32
je 0x1000b10d
cmp al, 0x33
jne 0x1000b20a
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x20], 0
test ecx, ecx
jbe 0x1000b1d2
lea edx, [esp + 0x34]
push edx
push 0x10020c18
push esi
call ebp
mov eax, dword [esp + 0x40]
mov cl, byte [esp + 0x1e]
add esp, 0xc
add ebx, eax
cmp cl, 0x30
jne 0x1000b14a
mov ecx, dword [esp + 0x20]
mov byte [esp + ecx + 0x38], al
jmp 0x1000b1b9
mov ecx, dword [esp + 0x18]
cmp ecx, 0xc00000
jne 0x1000b15a
mov dword [esp + 0x18], ecx
push eax
push ecx
call dword [esp + 0xc8]
add esp, 8
test al, al
jne 0x1000b190
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
push edx
push eax
push str._nWarning_at_line__d:_Two_writes_at_addr__x
call dword [sym.imp.MSVCRT.dll_printf]
mov eax, dword [edi + 0xac]
add esp, 0xc
test eax, eax
jne 0x1000b285
mov ecx, dword [edi + 8]
mov eax, dword [esp + 0x18]
test ecx, ecx
jne 0x1000b1a0
mov dword [edi], eax
mov dword [edi + 4], eax
inc ecx
mov dword [edi + 8], ecx
mov ecx, dword [edi]
cmp eax, ecx
jbe 0x1000b1ac
mov dword [edi], eax
cmp eax, dword [edi + 4]
jae 0x1000b1b4
mov dword [edi + 4], eax
inc eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jb 0x1000b121
mov al, byte [esp + 0x12]
cmp al, 0x30
jne 0x1000b20a
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x38]
push edx
push str._nComment:__s
mov byte [esp + ecx + 0x40], 0
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
jmp 0x1000b20a
test byte [esi + 0xc], 0x10
jne 0x1000b2a0
push 0
push 0x13
lea ecx, [edi + 0x10]
call fcn.1000a8a0
lea eax, [esp + 0x30]
push eax
push 0x10020c18
push esi
call ebp
mov ecx, dword [esp + 0x3c]
add esp, 0xc
not ebx
and ebx, 0xff
mov eax, ebx
cmp ecx, eax
je 0x1000b25c
mov edx, dword [esp + 0x18]
push edx
push eax
mov eax, dword [esp + 0x30]
push ecx
push eax
push str._nchecksum_error_at_line__d__x_instead_of__x._Start_address___x
call dword [sym.imp.MSVCRT.dll_printf]
mov al, byte [edi + 0xac]
add esp, 0x14
test al, 1
jne 0x1000b25c
push 0
push 0x12
lea ecx, [edi + 0x10]
call fcn.1000a8a0
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [edi + 0x10]
call fcn.1000a960
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x1000b276
cmp eax, 0x12
jne 0x1000b2a0
mov eax, dword [esp + 0x24]
test eax, eax
jne 0x1000b2a0
xor ebx, ebx
jmp 0x1000aef8
push 0
push 1
lea ecx, [edi + 0x10]
call fcn.1000a8a0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xa8
ret 8
lea edx, [esp + 0x2c]
lea ecx, [edi + 0x10]
push edx
call fcn.1000a960
neg al
pop edi
pop esi
sbb eax, eax
pop ebp
inc eax
pop ebx
add esp, 0xa8
ret 8