Function at 0x40022371
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x400721b5
call fcn.4006f3a0
sub esp, 0x210
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], esp
xor eax, eax
mov dword [ebp - 0x50], edx
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x38], ax
push 0x40082a58
push ecx
lea eax, [ebp - 0x18]
mov dword [ebp - 4], ebx
push eax
mov dword [ebp - 0x18], ebx
call fcn.40056c18
add esp, 0xc
cmp dword [ebp - 0x18], ebx
jne 0x400223bf
push ebx
jmp 0x40022735
push 2
push ebx
push dword [ebp - 0x18]
xorps xmm0, xmm0
movlpd qword [ebp - 0x4c], xmm0
call fcn.40058295
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
push dword [ebp - 0x18]
call fcn.400580b3
push ebx
push ebx
push dword [ebp - 0x18]
call fcn.40058295
mov esi, dword [ebp - 0x4c]
lea eax, [ebp - 0x19]
add esp, 0x14
mov byte [ebp - 0x19], bl
lea ecx, [ebp - 0x44]
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x3c], ebx
push eax
lea eax, [esi + 1]
push eax
call fcn.40025399
mov byte [ebp - 4], 1
push dword [ebp - 0x18]
push 1
push esi
mov esi, dword [ebp - 0x44]
push esi
call fcn.40057a34
push dword [ebp - 0x18]
call fcn.4005492d
add esp, 0x14
lea ecx, [ebp - 0x20]
push esi
call fcn.4000d502
mov byte [ebp - 4], 2
mov edi, dword [eax]
cmp word [edi], bx
jne 0x40022443
mov eax, ebx
jmp 0x4002244a
push edi
call fcn.40054188
pop ecx
push eax
push edi
lea ecx, [ebp - 0x38]
call fcn.4000744c
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx - 0x10]
call fcn.40004636
mov byte [ebp - 4], bl
test esi, esi
je 0x4002246d
push esi
call fcn.40053016
pop ecx
cmp dword [ebp - 0x24], 8
lea ecx, [ebp - 0x38]
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x20]
cmovae ecx, dword [ebp - 0x38]
mov dword [ebp - 0x20], 0xa
mov dword [ebp - 0x18], 0xd
lea eax, [ecx + eax*2]
lea ecx, [ebp - 0x38]
cmovae ecx, dword [ebp - 0x38]
push eax
push ecx
lea ecx, [ebp - 0x18]
call fcn.40026fb3
pop ecx
pop ecx
lea ecx, [ebp - 0x9c]
call fcn.40027047
push ecx
push ecx
lea eax, [ebp - 0x38]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x214]
call fcn.40024706
lea edx, [ebp - 0x9c]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x214]
call fcn.40027108
lea ecx, [ebp - 0x214]
call fcn.40022752
mov dword [ebp - 4], 3
mov eax, dword [ebp - 0x84]
add eax, 9
je 0x400224f7
lea ebx, [eax - 9]
mov ebx, dword [ebx + 4]
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x9c]
call fcn.400270dd
mov esi, dword [eax]
mov dword [ebp - 0x20], esi
cmp esi, ebx
je 0x400226ff
push 0x3c
pop edi
push esi
lea ecx, [ebp - 0x128]
call fcn.400169af
add esi, 0x18
mov byte [ebp - 4], 7
push esi
lea ecx, [ebp - 0x110]
call fcn.40026fef
lea eax, [ebp - 0x128]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x68]
call fcn.400169af
mov byte [ebp - 4], 9
lea eax, [ebp - 0x68]
cmp dword [ebp - 0x54], 8
cmovae eax, dword [ebp - 0x68]
cmp word [eax], di
jne 0x4002257f
push 0
push 1
lea ecx, [ebp - 0x68]
call fcn.40007169
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 3
call fcn.400227ab
jmp 0x400226ec
lea ecx, [ebp - 0xbc]
call fcn.40024da9
mov byte [ebp - 4], 0xa
mov eax, dword [ebp - 0xf8]
add eax, 9
je 0x4002259e
lea edi, [eax - 9]
jmp 0x400225a0
xor edi, edi
mov edi, dword [edi + 4]
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x110]
call fcn.400270dd
mov esi, dword [eax]
mov dword [ebp - 0x18], esi
jmp 0x40022663
push esi
lea ecx, [ebp - 0xf0]
call fcn.400169af
add esi, 0x18
mov byte [ebp - 4], 0xb
push esi
lea ecx, [ebp - 0xd8]
call fcn.40026fef
lea eax, [ebp - 0xf0]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x80]
call fcn.400169af
mov byte [ebp - 4], 0xd
lea eax, [ebp - 0x80]
cmp dword [ebp - 0x6c], 8
push 0x3c
cmovae eax, dword [ebp - 0x80]
pop ecx
cmp word [eax], cx
je 0x4002263d
lea eax, [ebp - 0xd8]
push eax
lea edx, [ebp - 0x80]
lea ecx, [ebp - 0x160]
call fcn.400277b9
pop ecx
push eax
lea eax, [ebp - 0x130]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0xbc]
call fcn.400277f5
lea ecx, [ebp - 0x160]
call fcn.400227e7
push 0
push 1
lea ecx, [ebp - 0x80]
call fcn.40007169
lea ecx, [ebp - 0xf0]
mov byte [ebp - 4], 0xa
call fcn.400227ab
lea ecx, [ebp - 0x18]
call fcn.40028370
mov esi, dword [ebp - 0x18]
cmp esi, edi
jne 0x400225bc
lea eax, [ebp - 0xbc]
push eax
lea edx, [ebp - 0x68]
lea ecx, [ebp - 0xf4]
call fcn.4002783c
pop ecx
mov ecx, dword [ebp - 0x50]
push eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 0xf
push eax
call fcn.400278a4
lea ecx, [ebp - 0xdc]
call fcn.40024dfd
push 0
push 1
lea ecx, [ebp - 0xf4]
call fcn.40007169
lea ecx, [ebp - 0xb4]
call fcn.40002cf2
lea ecx, [ebp - 0xbc]
call fcn.400268ed
push dword [ebp - 0xbc]
call fcn.40053016
pop ecx
push 0
push 1
lea ecx, [ebp - 0x68]
call fcn.40007169
lea ecx, [ebp - 0x128]
mov byte [ebp - 4], 3
call fcn.400227ab
push 0x3c
pop edi
lea ecx, [ebp - 0x20]
call fcn.40028370
mov esi, dword [ebp - 0x20]
cmp esi, ebx
jne 0x40022519
lea ecx, [ebp - 0x9c]
mov byte [ebp - 4], 0
call fcn.400270a1
push 0
push 1
lea ecx, [ebp - 0x38]
call fcn.40007169
mov al, 1
jmp 0x40022741
push 1
lea ecx, [ebp - 0x38]
call fcn.40007169
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret