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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [ebp - 8], ebx
mov dword [esi + 0x108f4], ebx
mov dword [esi + 0x108f0], ebx
mov dword [esi + 0x108f8], ebx
mov dword [esi + 0x109c4], 1
mov dword [esi + 0x108e0], ebx
cmp dword [esi + 0x44], ebx
je 0x4990b2
cmp dword [esi + 0x38], ebx
jne 0x49907e
push ebx
push ecx
push 0x5b9638
push 0x5b9638
lea edx, [esi + 0x88dc]
lea ecx, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0049a550
push eax
push str.test
push str._8sing:___22s___s_s
push edi
call fcn.00436c30
add esp, 0x1c
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov ecx, dword [esi + 0x90]
mov edi, ecx
mov edx, dword [esi + 0x108ec]
cmp edx, ecx
jle 0x4990fd
test ecx, ecx
jns 0x499098
xor ecx, ecx
xor edi, edi
mov eax, dword [esi + 0x108e8]
add eax, ecx
mov dword [esi + 0x108ec], ecx
sub edx, ecx
mov dword [esi + 0x10b70], eax
mov eax, edx
jmp 0x499101
cmp dword [esi + 0x14], ebx
je 0x4990e8
cmp dword [esi + 0xa0], ebx
jne 0x4990e8
push 1
call fcn.0053aee3
add esp, 4
mov dword [esi + 0x109d8], eax
push 0x8000
push eax
call fcn.005425a4
add esp, 4
push eax
call fcn.00546b06
add esp, 8
jmp 0x49907e
call fcn.00492390
test eax, eax
je 0x49907e
mov eax, 0x32
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, edx
mov dword [esi + 0x10b6c], eax
sub edi, ecx
movzx ecx, word [esi + 0x10934]
mov eax, ecx
mov dword [esi + 0x90], edi
cmp eax, 9
ja case.0x499128.2
movzx eax, byte [eax + 0x499b7c]
jmp dword [eax*4 + 0x499b68]
cmp dword [esi + 0x44], ebx
jne 0x4991bb
cmp dword [esi + 0x38], ebx
jne 0x4991bb
cmp dword [esi + 0x10], 1
je 0x49914a
mov ecx, 0x5b9638
jmp 0x499170
cmp dword [esi + 0x10924], ebx
jne 0x499159
mov ecx, str._empty_
jmp 0x499170
mov eax, dword [esi + 0x8d8]
mov ecx, str._text_
test byte [eax + 0x18], 4
mov eax, str._binary_
cmove ecx, eax
cmp dword [esi + 0x14], ebx
lea edi, [esi + 0x8dc]
push 0
mov edx, 0x5b9638
mov eax, 0x5c39d8
push ecx
cmove eax, edx
lea edx, [esi + 0x88dc]
push eax
push ecx
lea ecx, [esi + 0x109f0]
call fcn.0049a550
push eax
push str.extract
push str._8sing:___22s___s_s
push edi
call fcn.00436c30
add esp, 0x1c
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
cmp dword [esi + 0xa8], ebx
je 0x4991d4
mov ecx, dword [esi + 0xb0]
mov eax, dword [esi + 0xb4]
mov dword [ebp - 4], ecx
jmp 0x4991e1
mov dword [ebp - 4], 0x10000
lea eax, [esi + 0x8dc]
mov dword [esi + 0xbc], eax
mov dword [esi + 0x109e8], eax
mov dword [esi + 0x109ec], ebx
nop dword [eax]
nop word [eax + eax]
mov ecx, dword [esi + 0x108ec]
lea eax, [ecx - 1]
mov dword [esi + 0x108ec], eax
test ecx, ecx
jg 0x499338
cmp dword [esi + 0x109b0], 0
jne 0x4993bc
mov eax, dword [esi + 0x90]
test eax, eax
jle 0x4993ab
push 0x2000
push dword [esi + 0x108e4]
push dword [esi + 0x10908]
call fcn.00543773
add esp, 0xc
mov dword [esi + 0x108ec], eax
test eax, eax
je 0x4993b2
js 0x499b45
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 0x49932f
mov eax, dword [esi + 0x108e8]
test edi, edi
je 0x49932f
mov ebx, eax
nop dword [eax]
nop dword [eax + 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 0x4992b0
mov ebx, dword [ebp - 8]
mov ecx, dword [esi + 0x108ec]
lea eax, [ecx - 1]
mov dword [esi + 0x108ec], eax
mov eax, dword [esi + 0x108e8]
mov cl, byte [eax]
inc eax
mov dword [esi + 0x108e8], eax
mov eax, dword [esi + 0x109e8]
mov byte [eax], cl
mov eax, dword [esi + 0x109ec]
inc dword [esi + 0x109e8]
inc eax
mov dword [esi + 0x109ec], eax
cmp eax, dword [ebp - 4]
jne 0x499200
mov edx, dword [esi + 0xbc]
mov ecx, esi
push 0
push eax
call fcn.00492930
mov ecx, dword [esi + 0xbc]
mov ebx, eax
add esp, 8
mov dword [ebp - 8], ebx
mov dword [esi + 0x109e8], ecx
mov dword [esi + 0x109ec], 0
test ebx, ebx
jne 0x4993bc
cmp dword [esi + 0x109c0], eax
je 0x499200
jmp 0x4993bc
dec eax
mov dword [esi + 0x90], eax
mov dword [esi + 0x108ec], 0
mov eax, dword [esi + 0x109ec]
test eax, eax
je 0x499811
mov edx, dword [esi + 0xbc]
mov ecx, esi
push 0
push eax
call fcn.00492930
add esp, 8
jmp 0x499811
cmp dword [esi + 0x44], ebx
jne 0x49945b
cmp dword [esi + 0x38], ebx
jne 0x49945b
cmp dword [esi + 0x10], 1
je 0x4993f9
mov ecx, 0x5b9638
jmp 0x499410
mov eax, dword [esi + 0x8d8]
mov ecx, str._text_
test byte [eax + 0x18], 4
mov eax, str._binary_
cmove ecx, eax
cmp dword [esi + 0x14], ebx
lea edi, [esi + 0x8dc]
push 0
mov edx, 0x5b9638
mov eax, 0x5c39d8
push ecx
cmove eax, edx
lea edx, [esi + 0x88dc]
push eax
push ecx
lea ecx, [esi + 0x109f0]
call fcn.0049a550
push eax
push str.unshrink
push str._8sing:___22s___s_s
push edi
call fcn.00436c30
add esp, 0x1c
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov ecx, esi
call fcn.0049e110
mov dword [ebp - 8], eax
test eax, eax
je 0x499811
cmp eax, 0x32
jge 0x4994b0
mov eax, dword [esi + 0x38]
cmp dword [esi + 0x44], ebx
je 0x4994b7
test eax, eax
jne 0x4994bb
push 0x401
push ecx
push str.unshrink
push str.not_enough_memory_to
lea edi, [esi + 0x8dc]
push str._n__error:___s_s_n
push edi
call fcn.00436c30
add esp, 0x14
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov eax, dword [ebp - 8]
mov ebx, eax
jmp 0x499811
test eax, eax
je 0x49947e
push 0x401
lea edx, [esi + 0x88dc]
lea ecx, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0049a550
push ecx
push eax
push str.unshrink
push str.not_enough_memory_to
push str.__error:___s_s__s_n
push edi
call fcn.00436c30
add esp, 0x18
jmp 0x4994a2
mov edx, 0x5b9638
cmp dword [esi + 0x44], ebx
jne 0x499569
cmp dword [esi + 0x38], ebx
jne 0x499569
cmp dword [esi + 0x10], 1
je 0x49950c
mov ecx, edx
jmp 0x499523
mov eax, dword [esi + 0x8d8]
mov ecx, str._text_
test byte [eax + 0x18], 4
mov eax, str._binary_
cmove ecx, eax
cmp dword [esi + 0x14], ebx
lea edi, [esi + 0x8dc]
push 0
push ecx
mov eax, 0x5c39d8
cmove eax, edx
lea edx, [esi + 0x88dc]
push eax
push ecx
lea ecx, [esi + 0x109f0]
call fcn.0049a550
push eax
push str.explod
push str._8sing:___22s___s_s
push edi
call fcn.00436c30
add esp, 0x1c
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov ecx, esi
call fcn.0049dca0
mov ecx, eax
mov dword [ebp - 8], ecx
test ecx, ecx
je 0x499811
cmp ecx, 5
je 0x4995f3
cmp ecx, 0x32
jge 0x49980f
mov eax, dword [esi + 0x38]
cmp dword [esi + 0x44], ebx
je 0x4995a7
test eax, eax
jne 0x4995ab
push 0x401
push ecx
push str.explode
jmp 0x4997a1
test eax, eax
je 0x499597
push 0x401
lea edx, [esi + 0x88dc]
lea ecx, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0049a550
push ecx
push eax
push str.explode
cmp dword [ebp - 8], 3
mov ecx, str.invalid_compressed_data_to
mov eax, str.not_enough_memory_to
cmovne eax, ecx
push eax
push str.__error:___s_s__s_n
push edi
call fcn.00436c30
add esp, 0x18
jmp 0x4997c6
cmp dword [esi + 0x44], 0
mov ecx, dword [esi + 0x10920]
mov ebx, dword [esi + 0x94]
mov eax, dword [esi + 0x38]
mov dword [ebp - 8], ecx
je 0x49967b
test eax, eax
jne 0x49967f
push 0x401
push ecx
push 0x5c56e4
push 0x5b9638
push 0x5b9638
push ecx
cmp ebx, ecx
lea edi, [esi + 0x8dc]
mov edx, 0x5b9638
mov eax, 0x5cc084
cmova eax, edx
mov edx, str.error
push eax
push dword [esi + 0x10924]
mov eax, str.warning
push ebx
cmova eax, edx
push eax
push 0x5bfa68
push str._s___s:___ld_bytes_required_to_uncompress_to__lu_bytes__n_____s______supposed_to_require__lu_bytes_s_s_s_n
push edi
call fcn.00436c30
add esp, 0x30
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
cmp dword [ebp - 8], ebx
sbb ebx, ebx
neg ebx
inc ebx
jmp 0x499811
test eax, eax
je 0x49960f
push 0x401
push ecx
push 0x5cc6e4
lea edx, [esi + 0x88dc]
lea ecx, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0049a550
cmp ebx, dword [ebp - 8]
mov edx, 0x5b9638
push eax
push 0x5cc6e8
push dword [esi + 0x10920]
mov eax, 0x5cc084
cmova eax, edx
mov edx, str.error
push eax
push dword [esi + 0x10924]
mov eax, str.warning
push dword [esi + 0x94]
cmova eax, edx
push eax
push 0x5b9638
jmp 0x499655
mov eax, ecx
cmp dword [esi + 0x44], ebx
jne 0x499764
cmp dword [esi + 0x38], ebx
jne 0x499764
cmp dword [esi + 0x10], 1
je 0x4996fb
mov ecx, 0x5b9638
jmp 0x499712
mov eax, dword [esi + 0x8d8]
mov ecx, str._text_
test byte [eax + 0x18], 4
mov eax, str._binary_
cmove ecx, eax
cmp dword [esi + 0x14], ebx
lea edi, [esi + 0x8dc]
push 0
mov edx, 0x5b9638
mov eax, 0x5c39d8
push ecx
cmove eax, edx
lea edx, [esi + 0x88dc]
push eax
push ecx
lea ecx, [esi + 0x109f0]
call fcn.0049a550
push eax
push str.inflat
push str._8sing:___22s___s_s
push edi
call fcn.00436c30
add esp, 0x1c
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
movzx eax, word [esi + 0x10934]
xor edx, edx
mov ecx, esi
cmp ax, 9
sete dl
call fcn.0049b8f0
mov ecx, eax
mov dword [ebp - 8], ecx
test ecx, ecx
je 0x499811
cmp ecx, 0x32
jge 0x49980f
mov eax, dword [esi + 0x38]
cmp dword [esi + 0x44], ebx
je 0x4997e3
test eax, eax
jne 0x4997e7
push 0x401
push ecx
push str.inflate
cmp ecx, 3
lea edi, [esi + 0x8dc]
mov edx, str.invalid_compressed_data_to
mov eax, str.not_enough_memory_to
cmovne eax, edx
push eax
push str._n__error:___s_s_n
push edi
call fcn.00436c30
add esp, 0x14
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
xor ebx, ebx
cmp dword [ebp - 8], 3
sete bl
lea ebx, [ebx*4 + 2]
jmp 0x499811
test eax, eax
je 0x499796
push 0x401
lea edx, [esi + 0x88dc]
lea ecx, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0049a550
push ecx
push eax
push str.inflate
jmp 0x4995ce
mov ebx, ecx
cmp dword [esi + 0x44], 0
jne 0x49987e
cmp dword [esi + 0x14], 0
je 0x499828
cmp dword [esi + 0xa0], 0
je 0x49987e
jmp 0x499831
cmp dword [esi + 0xa0], 0
je 0x499877
mov eax, dword [esi + 0x8d8]
test byte [eax + 0x18], 8
je 0x49987e
mov eax, dword [esi + 0xb8]
mov byte [eax], 0
mov ecx, dword [esi + 0xb4]
mov eax, dword [esi + 0xb8]
sub eax, ecx
mov dword [esi + 0xb0], eax
inc eax
push eax
push ecx
call fcn.0052fd24
add esp, 8
mov dword [esi + 0xb4], eax
test eax, eax
jne 0x49987e
mov dword [esi + 0xb0], eax
jmp 0x49987e
mov ecx, esi
call fcn.0048f120
mov eax, dword [esi + 0x109c0]
test eax, eax
je 0x4998f6
cmp eax, 1
jle 0x4998cb
push 0x421
lea edx, [esi + 0x88dc]
lea ecx, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0049a550
push ecx
push eax
push str.warning:___s_is_probably_truncated_n
push edi
call fcn.00436c30
add esp, 0x10
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov ebx, 0x32
jmp 0x4998fb
mov ebx, 1
mov ecx, dword [esi + 0x108e0]
mov eax, dword [esi + 0x1092c]
mov edx, dword [esi + 0x44]
cmp ecx, eax
je 0x4999fe
test edx, edx
je 0x49995c
cmp dword [esi + 0x38], 0
jne 0x499962
jmp 0x4999a5
cmp ebx, 1
jle 0x4998d0
mov eax, dword [esi + 0x108ec]
test eax, eax
jle 0x49990b
add dword [esi + 0x90], eax
mov edx, dword [esi + 0x10b6c]
test edx, edx
jle 0x499945
mov ecx, dword [esi + 0x90]
mov dword [esi + 0x10b6c], 0
lea eax, [edx + ecx]
mov dword [esi + 0x108ec], eax
mov eax, dword [esi + 0x10b70]
sub eax, ecx
mov dword [esi + 0x108e8], eax
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jns 0x499953
mov dword [esi + 0x108ec], 0
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x38], 0
je 0x4999a5
push 0x401
lea edx, [esi + 0x88dc]
lea ecx, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0049a550
push ecx
push eax
push 0x5cc118
push edi
call fcn.00436c30
add esp, 0x10
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov eax, dword [esi + 0x1092c]
mov ecx, dword [esi + 0x108e0]
push 0x401
push ecx
push eax
push ecx
lea edi, [esi + 0x8dc]
push str._bad_CRC__08lx___should_be__08lx__n
push edi
call fcn.00436c30
add esp, 0x14
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov eax, dword [esi + 0x8d8]
test byte [eax + 0x18], 1
je 0x4999f7
push 0x401
push ecx
push str._____may_instead_be_incorrect_password__n
push edi
call fcn.00436c30
add esp, 0xc
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov ebx, 2
jmp 0x499a61
test edx, edx
je 0x499a36
mov edx, dword [esi + 0x10918]
test edx, edx
je 0x499a26
movzx eax, word [esi + 0x10938]
mov ecx, esi
push eax
call fcn.00499b90
add esp, 4
cmp eax, ebx
jle 0x499a61
mov ebx, eax
jmp 0x499a61
cmp dword [esi + 0x38], 0
jne 0x499a61
push 0
push ecx
push str._OK_n
jmp 0x499a47
cmp dword [esi + 0x38], 0
jne 0x499a61
test ebx, ebx
jne 0x499a61
push ebx
push ecx
push 0x5bfa68
lea edi, [esi + 0x8dc]
push edi
call fcn.00436c30
add esp, 0xc
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov eax, dword [esi + 0x108ec]
test eax, eax
jle 0x499a71
add dword [esi + 0x90], eax
mov edx, dword [esi + 0x10b6c]
test edx, edx
jle 0x499945
mov ecx, dword [esi + 0x90]
mov dword [esi + 0x10b6c], 0
lea eax, [edx + ecx]
mov dword [esi + 0x108ec], eax
mov eax, dword [esi + 0x10b70]
sub eax, ecx
mov dword [esi + 0x108e8], eax
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x401
lea edx, [esi + 0x88dc]
lea ecx, [esi + 0x109f0]
lea edi, [esi + 0x8dc]
call fcn.0049a550
push ecx
push eax
push str._s:__unknown_compression_method_n
push edi
call fcn.00436c30
add esp, 0x10
push eax
mov eax, dword [esi + 0x10b54]
push edi
push esi
call eax
mov eax, dword [esi + 0x108ec]
test eax, eax
jle 0x499af6
add dword [esi + 0x90], eax
mov edx, dword [esi + 0x10b6c]
test edx, edx
jle 0x499b2f
mov ecx, dword [esi + 0x90]
mov dword [esi + 0x10b6c], ebx
lea eax, [edx + ecx]
mov dword [esi + 0x108ec], eax
mov eax, dword [esi + 0x10b70]
sub eax, ecx
mov dword [esi + 0x108e8], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
jns 0x499b39
mov dword [esi + 0x108ec], ebx
pop edi
pop esi
mov eax, 1
pop ebx
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
nop
das
xchg ecx, eax
dec ecx
add dl, ah
xchg ebx, eax
dec ecx
add bl, dh
xchg esp, eax
dec ecx
add dl, ah
xchg esi, eax
dec ecx
add byte [edi + 0x499a], ch
add dword [esp + eax], eax
add al, 4
add al, byte [ebx + eax]
add ecx, esp
int3