Function at 0x49c680
Capabilities:
Encode data using xor
Generate random numbers using the delphi lcg
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x5d60c4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x18], edx
push edi
mov eax, dword [esi + 0x8d8]
and dword [eax + 0x18], 0xfffffffe
mov ecx, dword [esi + 0x90]
mov edx, ecx
mov edi, dword [esi + 0x108ec]
cmp edi, ecx
jle 0x49c6d6
test ecx, ecx
jns 0x49c6bc
xor ecx, ecx
xor edx, edx
mov eax, dword [esi + 0x108e8]
add eax, ecx
mov dword [esi + 0x108ec], ecx
sub edi, ecx
mov dword [esi + 0x10b70], eax
mov eax, edi
jmp 0x49c6da
xor eax, eax
mov ecx, edi
sub edx, ecx
mov dword [esi + 0x10b6c], eax
mov dword [esi + 0x90], edx
xor edx, edx
mov dword [ebp - 0x14], edx
nop dword [eax]
mov eax, dword [esi + 0x108ec]
lea ecx, [eax - 1]
mov dword [esi + 0x108ec], ecx
test eax, eax
jg 0x49c846
cmp dword [esi + 0x109b0], 0
je 0x49c718
or bl, 0xff
jmp 0x49c855
mov eax, dword [esi + 0x90]
test eax, eax
jg 0x49c73d
dec eax
mov dword [esi + 0x108ec], 0
xor ecx, ecx
mov dword [esi + 0x90], eax
or bl, 0xff
jmp 0x49c855
push 0x2000
push dword [esi + 0x108e4]
push dword [esi + 0x10908]
call fcn.00543773
add esp, 0xc
mov dword [esi + 0x108ec], eax
test eax, eax
jne 0x49c773
mov edx, dword [ebp - 0x14]
xor ecx, ecx
mov dword [esi + 0x108ec], eax
or bl, 0xff
jmp 0x49c855
js 0x49caa9
mov eax, dword [esi + 0x108e4]
mov ecx, esi
add dword [esi + 0x10910], 0x2000
mov dword [esi + 0x108e8], eax
call fcn.00492590
mov eax, dword [esi + 0x8d8]
mov edi, dword [esi + 0x108ec]
mov ecx, edi
test byte [eax + 0x18], 1
je 0x49c83c
mov ebx, dword [esi + 0x108e8]
test edi, edi
je 0x49c83c
nop dword [eax]
mov ecx, dword [esi + 0x10b04]
lea ebx, [ebx + 1]
and ecx, 0xfffd
or ecx, 2
mov eax, ecx
xor eax, 1
imul eax, ecx
shr eax, 8
xor byte [ebx - 1], al
movzx eax, byte [ebx - 1]
mov ecx, dword [esi + 0x10afc]
xor eax, ecx
mov edx, dword [esi + 0x108dc]
movzx eax, al
shr ecx, 8
xor ecx, dword [edx + eax*4]
movzx eax, cl
add eax, dword [esi + 0x10b00]
imul eax, eax, 0x8088405
mov dword [esi + 0x10afc], ecx
mov ecx, dword [esi + 0x10b04]
inc eax
mov dword [esi + 0x10b00], eax
shr eax, 0x18
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [edx + eax*4]
mov dword [esi + 0x10b04], ecx
sub edi, 1
jne 0x49c7c0
mov ecx, dword [esi + 0x108ec]
mov edx, dword [ebp - 0x14]
dec ecx
mov dword [esi + 0x108ec], ecx
mov eax, dword [esi + 0x108e8]
mov bl, byte [eax]
inc eax
mov dword [esi + 0x108e8], eax
mov byte [ebp + edx - 0x10], bl
inc edx
mov dword [ebp - 0x14], edx
cmp edx, 0xc
jl 0x49c6f0
test ecx, ecx
jle 0x49c870
add dword [esi + 0x90], ecx
mov eax, dword [esi + 0x10b6c]
test eax, eax
jle 0x49c8a2
mov ecx, dword [esi + 0x90]
add eax, ecx
mov dword [esi + 0x108ec], eax
mov eax, dword [esi + 0x10b70]
sub eax, ecx
mov dword [esi + 0x10b6c], 0
mov dword [esi + 0x108e8], eax
jmp 0x49c8b0
test ecx, ecx
jns 0x49c8b0
mov dword [esi + 0x108ec], 0
mov eax, dword [esi + 0x8d8]
or dword [eax + 0x18], 1
cmp dword [esi + 0x84], 0
je 0x49c939
mov ebx, dword [ebp - 0x18]
mov eax, dword [esi + 0x10af4]
mov dword [esi + 0x84], 0
test ebx, ebx
je 0x49c922
test eax, eax
jne 0x49c939
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x49c8e3
sub ecx, edx
lea eax, [ecx + 1]
push eax
call fcn.00531933
mov ecx, eax
add esp, 4
mov dword [esi + 0x10af4], ecx
test ecx, ecx
je 0x49ca93
mov al, byte [ebx]
lea ebx, [ebx + 1]
mov byte [ecx], al
lea ecx, [ecx + 1]
test al, al
jne 0x49c908
mov dword [esi + 0x10af8], 1
jmp 0x49c939
test eax, eax
je 0x49c939
push eax
call fcn.0052fd09
add esp, 4
mov dword [esi + 0x10af4], 0
cmp dword [esi + 0x10af4], 0
je 0x49c962
lea edx, [ebp - 0x10]
mov ecx, esi
call fcn.0049cad0
test eax, eax
je 0x49ca68
cmp dword [esi + 0x10af8], 0
je 0x49c97a
jmp 0x49ca52
push 0x51
call fcn.00531933
add esp, 4
mov dword [esi + 0x10af4], eax
test eax, eax
je 0x49ca93
mov dword [ebp - 0x14], 0
lea eax, [esi + 0x109f0]
nop word [eax + eax]
push eax
push dword [esi + 0x10904]
lea eax, [ebp - 0x14]
push 0x51
push dword [esi + 0x10af4]
push eax
mov eax, dword [esi + 0x10b60]
push esi
call eax
mov dword [ebp - 0x18], eax
cmp eax, 5
je 0x49ca7b
test eax, eax
je 0x49c9cc
mov ecx, dword [esi + 0x10af4]
mov byte [ecx], 0
mov dword [ebp - 0x14], 0
push dword [esi + 0x10af4]
lea edx, [ebp - 0x10]
mov ecx, esi
call fcn.0049cb60
add esp, 4
test eax, eax
je 0x49ca68
mov ecx, dword [esi + 0x10af4]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x49c9f0
sub ecx, edx
lea eax, [ecx + 1]
push eax
call fcn.00531933
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x49ca32
push ebx
push dword [esi + 0x10af4]
call dword [sym.imp.USER32.dll_CharToOemA]
push ebx
lea edx, [ebp - 0x10]
mov ecx, esi
call fcn.0049cb60
push ebx
mov edi, eax
call fcn.0052fd09
add esp, 8
test edi, edi
je 0x49ca68
cmp dword [ebp - 0x18], 0xfffffffe
jne 0x49ca42
mov dword [esi + 0x10af8], 1
cmp dword [ebp - 0x14], 0
lea eax, [esi + 0x109f0]
jg 0x49c990
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052b789
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052b789
mov esp, ebp
pop ebp
ret
push dword [esi + 0x10af4]
call fcn.0052fd09
add esp, 4
mov dword [esi + 0x10af4], 0
mov ecx, dword [ebp - 4]
mov eax, 5
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052b789
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x10b54]
push 0x401
push 0x1b
push str.error:__zipfile_read_error_n
push esi
call eax
push 1
push 0x6524c0
call fcn.0052e084
int3