Function at 0x404180
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
push ebx
push esi
push edi
mov eax, ecx
push 0x42d124
push eax
mov dword [esp + 0x20], eax
call fcn.00411c9f
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4041ad
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor esi, esi
push 2
push esi
push ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x40], esi
call fcn.004123ab
push ebx
call fcn.00411bb8
mov edi, eax
mov dword [esp + 0x40], esi
add esp, 0x10
add edi, 1
je 0x40420c
push edi
lea ecx, [esp + 0x28]
call fcn.00406450
mov eax, dword [esp + 0x30]
sub eax, edi
test eax, eax
jle 0x404208
test edi, edi
jle 0x404208
mov esi, dword [esp + 0x24]
push eax
push esi
lea eax, [esi + edi]
push eax
call fcn.0040e610
add esp, 0xc
jmp 0x40420c
mov esi, dword [esp + 0x24]
push 0
push 0
push ebx
call fcn.004123ab
mov edi, dword [esp + 0x3c]
push ebx
lea eax, [edi - 1]
push eax
push 1
push esi
call fcn.00413b0b
push ebx
call fcn.00411ddb
mov ebx, dword [sym.imp.vstdlib.dll_KeyValuesSystem]
add esp, 0x20
mov byte [edi + esi - 1], 0
call ebx
push 0x20
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 4]
mov edi, eax
mov dword [esp + 0x14], eax
test edi, edi
je 0x40429b
mov dword [edi], 0xffffffff
mov dword [edi + 0x10], 0x10000
mov dword [edi + 0x18], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
call ebx
push 1
push 0x42cd80
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
mov dword [edi], eax
jmp 0x4042a1
xor edi, edi
mov dword [esp + 0x14], edi
test esi, esi
je 0x4044ad
mov eax, dword [esp + 0x18]
mov ecx, 0x42cd80
test eax, eax
cmovne ecx, eax
push ecx
push 0x42cd80
push 0x42cd80
push str.KeyValues::LoadFromBuffer__s_s_s_:_Begin
mov dword [esp + 0x30], ecx
call dword [sym.imp.tier0.dll_COM_TimestampedLog]
mov ecx, esi
add esp, 0x10
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4042e0
and dword [esp + 0x64], 0xfffffffc
sub ecx, edx
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], 0xffffffff
mov word [esp + 0x4c], 0x900
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x50], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x54], ecx
mov dword [esp + 0x5c], 0x40a8d0
mov dword [esp + 0x60], 0x40a7a0
cmp ecx, 2
jle 0x404430
cmp byte [esi], 0xff
jne 0x404430
cmp byte [esi + 1], 0xfe
jne 0x404430
lea ebx, [esi + 2]
test ebx, ebx
je 0x4043c5
xor ecx, ecx
mov edi, 0xffff
cmp word [ebx], 0
mov dword [esp + 0x10], ecx
je 0x4043be
lea eax, [esp + 0xf]
push eax
lea eax, [esp + 0x20]
push eax
push ebx
call fcn.0040aac0
add esp, 0xc
lea ebx, [ebx + eax*2]
mov eax, dword [esp + 0x1c]
cmp eax, 0x7f
ja 0x404399
mov ecx, dword [esp + 0x10]
mov eax, 1
add ecx, eax
jmp 0x404363
cmp eax, 0x7ff
ja 0x4043ad
mov ecx, dword [esp + 0x10]
mov eax, 2
add ecx, eax
jmp 0x404363
mov ecx, dword [esp + 0x10]
cmp edi, eax
sbb eax, eax
neg eax
add eax, 3
add ecx, eax
jmp 0x404363
mov edi, dword [esp + 0x14]
lea ebx, [ecx + 1]
call fcn.004022c0
mov edx, eax
mov eax, dword [sym.imp.tier0.dll_g_pMemAlloc]
mov ecx, dword [eax]
mov eax, dword [ecx]
test edx, edx
jne 0x4043df
push ebx
call dword [eax + 4]
jmp 0x4043e5
push 0
push edx
push ebx
call dword [eax]
push ecx
push ebx
mov edx, eax
mov dword [esp + 0x1c], eax
lea ecx, [esi + 2]
call fcn.0040ac80
add esp, 8
cmp dword [esp + 0x40], 0
jl 0x404414
mov edx, dword [esp + 0x38]
test edx, edx
je 0x404414
mov eax, dword [sym.imp.tier0.dll_g_pMemAlloc]
push edx
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x14]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x38], eax
or eax, 0xffffffff
cmp ebx, eax
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x48], ebx
cmovg eax, ebx
mov dword [esp + 0x54], eax
push 0
push 0
lea eax, [esp + 0x40]
mov ecx, edi
push eax
push dword [esp + 0x24]
call fcn.00408ef0
push dword [esp + 0x20]
mov bl, al
push 0x42cd80
push 0x42cd80
push str.KeyValues::LoadFromBuffer__s_s_s_:_End
call dword [sym.imp.tier0.dll_COM_TimestampedLog]
add esp, 0x10
cmp dword [esp + 0x40], 0
jl 0x40448e
mov edx, dword [esp + 0x38]
test edx, edx
je 0x404486
mov eax, dword [sym.imp.tier0.dll_g_pMemAlloc]
push edx
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x14]
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 0
test bl, bl
jne 0x4044ad
test edi, edi
je 0x4044ab
mov ecx, edi
call fcn.00408060
call dword [sym.imp.vstdlib.dll_KeyValuesSystem]
push edi
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 8]
xor edi, edi
mov ebx, dword [esp + 0x2c]
test ebx, ebx
js 0x4044de
test esi, esi
je 0x4044c8
mov eax, dword [sym.imp.tier0.dll_g_pMemAlloc]
push esi
mov ecx, dword [eax]
mov eax, dword [ecx]
call dword [eax + 0x14]
xor esi, esi
test ebx, ebx
js 0x4044de
test esi, esi
je 0x4044de
mov ecx, dword [sym.imp.tier0.dll_g_pMemAlloc]
push esi
mov ecx, dword [ecx]
mov edx, dword [ecx]
call dword [edx + 0x14]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret