Function at 0x10023730
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b8
mov eax, dword [0x1004e370]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1a8], edi
test ebx, ebx
jne 0x10023761
test esi, esi
je 0x10023a23
push 0x19
push edi
call fcn.10022340
add esp, 8
mov dword [ebp - 0x1b8], eax
test eax, eax
je 0x1002379c
mov ecx, dword [edi + 0x20]
movzx eax, byte [ecx + 0x331]
mov dword [ebp - 0x1b4], eax
cmp byte [ecx + eax*8 + 0x16], 0
je 0x100237b2
push str.fragmented_basic_auth_header_not_allowed_n
push 1
call fcn.1001dbe0
add esp, 8
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10039446
mov esp, ebp
pop ebp
ret
push 0x19
push 0xa0
lea eax, [ebp - 0x11c]
push eax
push edi
call fcn.100220d0
add esp, 0x10
cmp eax, 7
jge 0x100237f3
push str.b64_auth_too_long_n
push 1
call fcn.1001dbe0
add esp, 8
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10039446
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x11c]
mov byte [ebp - 0x117], 0
push str.Basic
push eax
call sub.msvcrt.dll__stricmp
add esp, 8
test eax, eax
je 0x1002383e
lea eax, [ebp - 0x11c]
push eax
push str.auth_missing_basic:__s_n
push 1
call fcn.1001dbe0
add esp, 0xc
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10039446
mov esp, ebp
pop ebp
ret
push 0x77
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x116]
push eax
call fcn.10031ae0
mov edi, eax
add esp, 0xc
mov dword [ebp - 0x1a0], edi
test edi, edi
jns 0x10023884
push str.plain_auth_too_long_n
push 1
call fcn.1001dbe0
add esp, 8
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10039446
mov esp, ebp
pop ebp
ret
cmp edi, 0x78
jae 0x10023a36
lea eax, [ebp - 0x7c]
mov byte [ebp + edi - 0x7c], 0
push 0x3a
push eax
call sub.msvcrt.dll_strchr
add esp, 8
mov dword [ebp - 0x1b0], eax
test eax, eax
jne 0x100238cf
push str.basic_auth_format_broken_n
push 1
call fcn.1001dbe0
add esp, 8
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10039446
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x1002390b
cmp esi, 0x10000000
jne 0x1002379c
mov esi, dword [ebp - 0x1a8]
lea ecx, [ebp - 0x7c]
push edi
push ecx
push dword [esi + 0x2a0]
mov eax, dword [esi + 8]
push 0x66
push esi
mov eax, dword [eax + 4]
call eax
add esp, 0x14
test eax, eax
jne 0x100239e0
jmp 0x1002379c
xor edi, edi
xor esi, esi
push edi
push ebx
call fcn.100202a0
add esp, 8
mov dword [ebp - 0x1a4], eax
test eax, eax
jns 0x1002394c
push ebx
push str.cant_open_auth_file:__s_n
push 1
call fcn.1001dbe0
add esp, 0xc
push str.lws_check_basic_auth
push str._s:_basic_auth_lookup_failed_n
push 1
call fcn.1001dbe0
add esp, 0xc
jmp 0x1002379c
mov ebx, dword [ebp - 0x1a0]
xor edx, edx
cmp edi, edx
jne 0x1002397b
push 0x80
lea ecx, [ebp - 0x19c]
push ecx
push eax
call sub.msvcrt.dll__read
add esp, 0xc
mov dword [ebp - 0x1ac], eax
test eax, eax
jle 0x100239b2
xor edi, edi
mov edx, eax
lea eax, [ebp - 0x19c]
cmp esi, ebx
jne 0x10023994
mov cl, byte [eax + edi]
cmp cl, 0xd
je 0x100239bf
cmp cl, 0xa
je 0x100239bf
xor esi, esi
mov al, byte [eax + edi]
cmp al, byte [ebp + esi - 0x7c]
jne 0x100239a7
mov eax, dword [ebp - 0x1a4]
inc esi
inc edi
jmp 0x10023954
mov eax, dword [ebp - 0x1a4]
xor esi, esi
inc edi
jmp 0x10023954
xor ebx, ebx
cmp esi, dword [ebp - 0x1a0]
sete bl
jmp 0x100239c4
mov ebx, 1
push dword [ebp - 0x1a4]
call sub.msvcrt.dll__close
add esp, 4
test ebx, ebx
je 0x10023933
mov esi, dword [ebp - 0x1a8]
mov ecx, dword [ebp - 0x1b0]
lea eax, [ebp - 0x7c]
mov edx, dword [ebp - 0x1b4]
push 0x19
push esi
mov byte [ecx], 0
sub cx, ax
mov eax, dword [esi + 0x20]
mov word [eax + edx*8 + 0x14], cx
call fcn.10022310
mov edi, dword [ebp - 0x1b8]
mov esi, eax
lea eax, [ebp - 0x7c]
lea ecx, [edi - 1]
push ecx
push eax
push esi
call sub.msvcrt.dll_strncpy
add esp, 0x14
mov byte [esi + edi - 1], 0
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10039446
mov esp, ebp
pop ebp
ret
call fcn.10039737
int3