Function at 0x522e80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59bced
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x61094c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x40], edi
mov eax, dword [edi + 0x1c]
mov ecx, dword [eax]
test ecx, ecx
je 0x522edc
mov edx, dword [edi + 0x2c]
mov esi, dword [edx]
lea eax, [esi + ecx]
cmp ecx, eax
jae 0x522edc
lea eax, [esi - 1]
mov dword [edx], eax
mov ecx, dword [edi + 0x1c]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
movzx eax, byte [edx]
jmp 0x5231ae
cmp dword [edi + 0x4c], 0
jne 0x522eea
or eax, 0xffffffff
jmp 0x5231ae
mov esi, dword [edi + 0xc]
lea eax, [edi + 0x3c]
cmp dword [esi], eax
jne 0x522f08
mov edx, dword [edi + 0x54]
mov ecx, dword [edi + 0x50]
sub edx, ecx
mov dword [esi], ecx
mov eax, dword [edi + 0x1c]
mov dword [eax], ecx
mov eax, dword [edi + 0x2c]
mov dword [eax], edx
cmp dword [edi + 0x38], 0
mov eax, dword [edi + 0x4c]
jne 0x522f30
push eax
push 1
lea eax, [ebp - 0x12]
push 1
push eax
call fcn.0056a3b9
add esp, 0x10
cmp eax, 1
jne 0x522ee2
movzx eax, byte [ebp - 0x12]
jmp 0x5231ae
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0xf
mov byte [ebp - 0x2c], 0
push eax
mov dword [ebp - 4], 0
call fcn.00569416
mov edx, eax
add esp, 4
mov dword [ebp - 0x44], edx
cmp edx, 0xffffffff
je 0x523123
mov ecx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x3c], ecx
cmp edi, ecx
jae 0x522f97
lea eax, [edi + 1]
cmp ecx, 0x10
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
mov byte [eax + edi], dl
mov byte [eax + edi + 1], 0
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x38], ecx
jmp 0x52306a
mov eax, SysReAllocString
sub eax, edi
cmp eax, 1
jb 0x5231cf
lea esi, [edi + 1]
or esi, 0xf
cmp esi, 0x7fffffff
jbe 0x522fbc
mov esi, SysReAllocString
jmp 0x522fda
mov edx, ecx
mov eax, SysReAllocString
shr edx, 1
sub eax, edx
cmp ecx, eax
jbe 0x522fd2
mov esi, SysReAllocString
jmp 0x522fda
lea eax, [edx + ecx]
cmp esi, eax
cmovb esi, eax
xor ecx, ecx
mov eax, esi
add eax, 1
setb cl
neg ecx
or ecx, eax
push ecx
lea ecx, [ebp - 0x2c]
call fcn.00426ad0
cmp dword [ebp - 0x3c], 0x10
mov ebx, eax
lea eax, [edi + 1]
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], esi
push edi
jb 0x52304c
mov esi, dword [ebp - 0x2c]
push esi
push ebx
call fcn.00555c00
mov ecx, dword [ebp - 0x3c]
add esp, 0xc
mov eax, dword [ebp - 0x44]
inc ecx
mov byte [edi + ebx], al
mov byte [edi + ebx + 1], 0
cmp ecx, 0x1000
jb 0x523040
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x5231ca
mov esi, edx
push ecx
push esi
call fcn.00554162
add esp, 8
jmp 0x523067
lea eax, [ebp - 0x2c]
push eax
push ebx
call fcn.00555c00
mov eax, dword [ebp - 0x44]
add esp, 0xc
mov byte [edi + ebx], al
mov byte [edi + ebx + 1], 0
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x2c], ebx
mov ebx, dword [ebp - 0x40]
lea ecx, [ebp - 0x2c]
cmp dword [ebp - 0x18], 0x10
lea esi, [ebp - 0x2c]
mov edi, dword [ebp - 0x1c]
cmovae ecx, dword [ebp - 0x38]
mov ebx, dword [ebx + 0x38]
add edi, ecx
cmp dword [ebp - 0x18], 0x10
mov dword [ebp - 0x3c], ebx
cmovae esi, dword [ebp - 0x38]
mov eax, dword [ebx]
mov ebx, dword [eax + 0x18]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x10]
mov ecx, ebx
push eax
lea eax, [ebp - 0x11]
push eax
lea eax, [ebp - 0x30]
push eax
push edi
mov edi, dword [ebp - 0x40]
push esi
lea eax, [edi + 0x40]
push eax
call dword [0x5a0478]
mov ecx, dword [ebp - 0x3c]
call ebx
sub eax, 0
je 0x5230c7
sub eax, 1
jne 0x523156
lea eax, [ebp - 0x11]
cmp dword [ebp - 0x34], eax
lea eax, [ebp - 0x2c]
jne 0x52316b
cmp dword [ebp - 0x18], 0x10
lea edx, [ebp - 0x2c]
mov edi, dword [ebp - 0x30]
cmovae eax, dword [ebp - 0x2c]
sub edi, eax
mov eax, dword [ebp - 0x1c]
cmp eax, edi
cmovb edi, eax
cmp dword [ebp - 0x18], 0x10
cmovae edx, dword [ebp - 0x2c]
sub eax, edi
mov dword [ebp - 0x1c], eax
inc eax
push eax
lea eax, [edx + edi]
push eax
push edx
call fcn.00555c00
mov eax, dword [ebp - 0x40]
push dword [eax + 0x4c]
call fcn.00569416
mov edx, eax
add esp, 0x10
mov dword [ebp - 0x44], edx
cmp edx, 0xffffffff
jne 0x522f67
or esi, 0xffffffff
mov edx, dword [ebp - 0x18]
cmp edx, 0x10
jb 0x5231ac
mov ecx, dword [ebp - 0x2c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x5231a2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5231ca
jmp 0x5231a2
sub eax, 2
jne 0x523123
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
cmovae eax, dword [ebp - 0x2c]
movsx esi, byte [eax]
jmp 0x523126
cmp dword [ebp - 0x18], 0x10
mov esi, dword [ebp - 0x1c]
cmovae eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
sub esi, ecx
add esi, eax
test esi, esi
jle 0x52319c
push dword [edi + 0x4c]
movsx eax, byte [esi + ecx - 1]
dec esi
push eax
call fcn.005697a9
add esp, 8
test esi, esi
jle 0x52319c
mov ecx, dword [ebp - 0x30]
jmp 0x523181
movzx esi, byte [ebp - 0x11]
jmp 0x523126
push edx
push ecx
call fcn.00554162
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00553cca
mov esp, ebp
pop ebp
ret
call fcn.0055eb27
call fcn.004213b0
int3