Function at 0x40b300
Capabilities:
Read file on windows

Disassembly:
push ebp
xor edx, edx
push edi
push esi
push ebx
sub esp, 0x2c
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x20], 0
test ebx, ebx
je 0x40b4d7
cmp dword [esp + 0x44], 6
ja case.0x40b32c.4
mov edx, dword [esp + 0x44]
jmp dword [edx*4 + 0x40b334]
mov dword [esp + 0x28], ebx
test ebx, ebx
je 0x40b4ae
mov eax, dword [esp + 0x28]
mov esi, dword [0x438de4]
cmp eax, 0x20000
mov ebx, esi
jbe 0x40b374
mov eax, 0x20000
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.0040a230
mov dword [esp + 0x24], eax
test eax, eax
mov edx, 0x33
je 0x40b4d7
sub dword [esp + 0x28], eax
mov edx, dword [0x438de4]
mov ecx, dword [esp + 0x24]
mov byte [ecx + edx], 0
movzx edx, byte [esi]
test dl, dl
je 0x40b3c4
lea esi, [esi]
cmp dl, 0xd
je 0x40b5b0
mov byte [esi], dl
inc ebx
inc esi
movzx edx, byte [ebx]
test dl, dl
jne 0x40b3b0
mov byte [esi], 0
cmp dword [esp + 0x44], 5
je 0x40b547
mov ebx, dword [0x438de4]
mov esi, 0x428cb8
movzx eax, byte [ebx]
mov dword [esp + 0x14], 0x4283f0
test al, al
je 0x40b46a
mov ecx, 0x4283f0
mov dl, al
neg ecx
lea ebp, [ecx - 0x8c8]
nop
xor edi, edi
cmp dl, 0x1b
je 0x40b53b
cmp dl, 0x13
je 0x40b503
mov byte [esi], dl
inc esi
lea eax, [ebp + esi]
cmp eax, 0xfffd
ja 0x40b426
test edi, edi
je 0x40b460
mov dword [esp + 0xc], 0
mov esi, 0x428cb8
mov dword [esp + 8], eax
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
test edi, edi
je 0x40b460
mov eax, dword [0x428484]
test eax, eax
jne 0x40b4e1
lea esi, [esi]
inc ebx
movzx ecx, byte [ebx]
test cl, cl
mov dl, cl
jne 0x40b400
neg dword [esp + 0x14]
mov dword [esp + 0xc], 0
mov dword [esp + 4], 0x428cb8
mov edi, dword [esp + 0x14]
mov dword [esp], 0x4283f0
lea ebx, [esi + edi - 0x8c8]
mov dword [esp + 8], ebx
call dword [0x439258]
mov ebp, dword [esp + 0x28]
test ebp, ebp
je 0x40b4ae
mov esi, dword [esp + 0x24]
test esi, esi
jne 0x40b35c
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov edx, dword [esp + 0x20]
add esp, 0x2c
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], 0
mov dword [esp + 4], 0x409e10
mov dword [esp], 0x4283f0
call dword [0x439260]
jmp 0x40b460
movzx eax, byte [ebx + 1]
mov edi, 1
cmp al, 0xa
je 0x40b532
cmp al, 0xd
jne 0x40b417
cmp byte [ebx + 2], 0xa
jne 0x40b417
inc ebx
movzx ecx, byte [ebx]
inc ebx
mov byte [esi], cl
inc esi
movzx edx, byte [ebx]
jmp 0x40b414
mov byte [esi], 0xa
inc ebx
jmp 0x40b416
mov byte [esi], 0x5e
inc esi
mov byte [esi], 0x5b
jmp 0x40b416
mov edx, dword [0x428cb4]
mov ecx, edx
cmp byte [edx + 0x13], 0
jne 0x40b59d
test byte [edx + 0x18], 0x40
je 0x40b56e
movzx edx, byte [edx + 0x12]
mov bl, dl
sub bl, 0x19
cmp bl, 1
jbe 0x40b59d
cmp dl, 0x28
je 0x40b59d
mov esi, dword [0x438de4]
mov dword [esp + 4], esi
mov dword [esp], esi
call sub.USER32.dll_OemToCharA
sub esp, 8
mov edi, dword [0x438de4]
mov dword [esp + 4], edi
mov dword [esp], edi
call sub.USER32.dll_CharToOemA
sub esp, 8
jmp 0x40b3d2
cmp byte [ecx + 0x13], 6
je 0x40b56e
cmp word [ecx + 0x12], 0xb32
jne 0x40b583
jmp 0x40b56e
inc ebx
movzx edx, byte [ebx]
cmp dl, 0xd
je 0x40b5b0
jmp 0x40b3b9
mov esi, dword [0x438cec]
mov ebp, dword [0x438cf0]
mov ecx, dword [0x438cc4]
mov edi, dword [0x438cc0]
mov eax, esi
sub eax, ebp
sub ecx, edi
add eax, ecx
add eax, ebx
add eax, ebp
test eax, eax
mov edx, eax
js 0x40b6c2
and edx, 0xffffe000
mov ebx, eax
sub ebx, edx
mov edx, eax
sub edx, ebx
test eax, eax
js 0x40b68b
cmp edx, esi
je 0x40b675
mov dword [esp + 0xc], 0
mov edi, dword [0x438ce4]
mov ebp, edx
mov dword [esp + 4], edx
sar ebp, 0x1f
mov dword [esp + 8], ebp
mov dword [esp], edi
call sub.msvcrt.dll__lseeki64
mov dword [0x438cec], eax
mov edx, dword [0x438cc0]
mov ecx, dword [0x438ce4]
mov dword [esp + 8], 0x2000
mov dword [esp + 4], edx
mov dword [esp], ecx
call sub.msvcrt.dll__read
mov dword [0x438cc8], eax
test eax, eax
jle case.0x40b32c.4
mov esi, dword [0x438cc0]
sub eax, ebx
mov dword [0x438cc8], eax
add ebx, esi
mov dword [0x438cc4], ebx
jmp case.0x40b32c.4
sub ecx, ebx
add dword [0x438cc8], ecx
lea ecx, [ebx + edi]
mov dword [0x438cc4], ecx
jmp case.0x40b32c.4
mov dword [esp + 0xc], 0x401470
mov esi, dword [0x438ce0]
mov dword [esp + 4], 0x4013b0
mov dword [esp], 0x428cb8
mov dword [esp + 8], esi
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
jmp 0x40b4be
lea edx, [eax + 0x1fff]
jmp 0x40b5ec
mov eax, dword [0x438cf4]
test eax, eax
jne 0x40b743
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
mov dword [0x438cf4], eax
test eax, eax
je 0x40b705
mov dword [esp + 4], ebx
mov dword [esp], eax
call fcn.0040a230
test eax, eax
mov edx, 0x33
jne case.0x40b32c.4
jmp 0x40b4d7
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x409d50
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
jmp case.0x40b32c.0
mov dword [esp], eax
call sub.msvcrt.dll_free
jmp 0x40b6d6
mov dword [esp + 0x24], 0
cmp ebx, 0x3ff
ja 0x40b93f
mov dword [esp + 4], ebx
mov dword [esp], 0x438df8
call fcn.0040a230
test eax, eax
mov edx, 0x33
je 0x40b4d7
mov byte [ebx + 0x438df8], 0
mov edx, dword [0x428cb4]
mov esi, edx
cmp byte [edx + 0x13], 0
jne 0x40b924
cmp dword [esp + 0x44], 6
je 0x40b7a4
test byte [edx + 0x18], 0x40
je 0x40b7bd
movzx ecx, byte [edx + 0x12]
mov al, cl
sub al, 0x19
cmp al, 1
jbe 0x40b924
cmp cl, 0x28
je 0x40b924
mov dword [esp + 4], 0x438df8
mov dword [esp], 0x438df8
call sub.USER32.dll_OemToCharA
mov edx, dword [0x428cb4]
sub esp, 8
test byte [edx + 0x18], 0x10
je 0x40b803
movzx edx, byte [0x438df8]
mov esi, 0x438df8
mov edi, esi
mov byte [esp + 0x1f], dl
test dl, dl
jne 0x40b890
mov byte [edi], 0
mov edx, dword [0x428cb4]
test byte [edx + 0x18], 0x20
je 0x40b817
cmp ebx, 8
jbe 0x40b817
cmp byte [0x438e00], 0x2e
je 0x40b879
mov edi, dword [esp + 0x24]
test edi, edi
je case.0x40b32c.4
mov dword [esp + 4], 0x430cb8
mov dword [esp], 0x438df8
call fcn.00409b40
mov dword [esp + 8], eax
mov dword [esp + 4], 0x40b2ed
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov ebx, dword [esp + 0x24]
jmp case.0x40b32c.0
mov edx, 0x438e01
movzx ebx, byte [edx]
mov byte [edx - 1], bl
inc edx
test bl, bl
jne 0x40b87e
jmp 0x40b817
mov ebp, dword [sym.imp.msvcrt.dll___mb_cur_max]
mov ecx, dword [ebp]
mov dword [esp], esi
mov dword [esp + 4], ecx
call sub.msvcrt.dll_mblen
cmp eax, 1
mov edx, eax
jbe 0x40b8cf
dec edx
cmp edx, 0xffffffff
je 0x40b8bf
movzx ecx, byte [esi]
dec edx
inc esi
mov byte [edi], cl
inc edi
cmp edx, 0xffffffff
jne 0x40b8b2
movzx eax, byte [esi]
test al, al
mov byte [esp + 0x1f], al
jne 0x40b890
jmp 0x40b7fa
mov dword [esp + 0x18], edi
mov edx, dword [sym.imp.msvcrt.dll___mb_cur_max]
inc edi
movsx ebp, byte [esp + 0x1f]
cmp dword [edx], 1
je 0x40b913
mov dword [esp + 4], 1
mov dword [esp], ebp
call sub.msvcrt.dll__isctype
movzx edx, byte [esp + 0x1f]
test eax, eax
jne 0x40b907
mov ebp, dword [esp + 0x18]
inc esi
mov byte [ebp], dl
jmp 0x40b8bf
mov dword [esp], ebp
call sub.msvcrt.dll_tolower
mov dl, al
jmp 0x40b8fd
mov edx, dword [sym.imp.msvcrt.dll__pctype]
mov ecx, dword [edx]
movzx eax, word [ecx + ebp*2]
and eax, 1
jmp 0x40b8f4
cmp byte [esi + 0x13], 6
je 0x40b7bd
cmp word [esi + 0x12], 0xb32
jne 0x40b7da
jmp 0x40b7bd
mov dword [esp + 4], 0x409d10
sub ebx, 0x3ff
mov dword [esp], 0x428cb8
call sub.msvcrt.dll_sprintf
mov dword [esp + 8], eax
mov dword [esp + 0xc], 0x401
mov dword [esp + 4], 0x428cb8
mov dword [esp], 0x4283f0
call dword [0x439258]
mov dword [esp + 0x24], ebx
mov ebx, 0x3ff
mov dword [esp + 0x20], 1
jmp 0x40b761