Function at 0x4036b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x422ea5
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push esi
push edi
mov eax, dword [0x435004]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x28], esi
mov eax, dword [esi + 4]
mov ecx, dword [ebp + 0xc]
test eax, eax
jne 0x403703
mov dword [ecx], str.CPsiArchiveReader:_File_is_not_open
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push eax
call fcn.00411153
xor eax, eax
mov dword [esi + 0x20], 0xffffffff
mov dword [esi + 0x24], 0xffffffff
mov dword [esi + 0x28], 0x7fffffff
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 4], eax
xor edi, edi
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x60], edi
mov dword [ebp - 0x5c], eax
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 1
mov ecx, dword [esi + 4]
lea edx, [esi + 8]
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x34], 0xffffffff
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x50], edx
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00404470
add esp, 0x18
test al, al
je 0x403b5c
cmp dword [ebp - 0x30], 0x2000000
ja 0x403b4b
mov eax, dword [ebp - 0x1c]
movzx ecx, word [ebp - 0x10]
inc eax
shr eax, 1
add eax, dword [ebp - 0x2c]
add ecx, eax
mov dword [ebp - 0x38], 0xffff0000
not ecx
and ecx, 1
lea eax, [ecx*2 + 2]
mov dword [ebp - 0x54], eax
lea ecx, [ebp - 0x70]
lea eax, [ebp - 0x38]
push eax
movzx eax, word [ebp - 0x14]
push eax
call fcn.00404640
mov cx, word [ebp - 0x10]
xor eax, eax
mov ebx, dword [ebp - 0x70]
xor edi, edi
mov dword [ebp - 0x20], ebx
cmp ax, cx
jae 0x40386c
mov esi, ebx
nop
mov eax, dword [ebp - 0x28]
push dword [eax + 4]
push 1
push 2
push esi
call fcn.0041198e
add esp, 0x10
cmp eax, 1
jne 0x403b29
movzx eax, word [esi]
mov edx, 0x1000
mov ecx, eax
cmp ax, dx
jb 0x403843
mov edx, dword [ebp - 0x64]
add eax, 0xfffff000
movzx ecx, ax
mov eax, dword [ebp - 0x60]
sub eax, edx
sar eax, 2
cmp ecx, eax
jae 0x403b18
mov eax, 0xffff
cmp word [edx + ecx*4 + 2], ax
je 0x403b18
movzx eax, word [edx + ecx*4]
mov word [esi], ax
movzx eax, word [edx + ecx*4 + 2]
mov word [esi + 2], ax
mov eax, 0xffff
mov word [edx + ecx*4 + 2], ax
movzx ecx, word [esi]
movzx eax, cx
mov ecx, dword [ebp - 0x30]
add eax, 3
cmp ecx, eax
jb 0x403b18
sub ecx, eax
inc edi
mov dword [ebp - 0x30], ecx
add esi, 4
mov cx, word [ebp - 0x10]
movzx eax, cx
cmp edi, eax
jb 0x4037d0
xor eax, eax
xor edi, edi
cmp ax, cx
jae 0x4038cb
lea esi, [ebx + 2]
nop dword [eax + eax]
mov eax, 0xffff
cmp word [esi], ax
jne 0x4038c0
cmp dword [ebp - 0x1c], 2
jb 0x403b18
mov eax, dword [ebp - 0x28]
push dword [eax + 4]
push 1
push 2
push esi
call fcn.0041198e
add esp, 0x10
cmp eax, 1
jne 0x403b29
sub dword [ebp - 0x1c], 2
mov eax, 0x1fff
and word [esi], ax
mov cx, word [ebp - 0x10]
inc edi
movzx eax, cx
add esi, 4
cmp edi, eax
jb 0x403880
movzx esi, cx
xor edi, edi
mov cx, word [ebp - 0x14]
movzx eax, cx
cmp esi, eax
jae 0x403928
mov eax, dword [ebp - 0x60]
lea ebx, [ebx + esi*4]
mov edx, dword [ebp - 0x64]
sub eax, edx
sar eax, 2
add edx, 2
mov dword [ebp - 0x40], eax
nop
cmp edi, eax
jae 0x403b18
mov eax, 0xffff
cmp word [edx], ax
je 0x40391a
movzx eax, word [edx - 2]
mov ecx, ebx
inc esi
add ebx, 4
mov word [ecx], ax
movzx eax, word [edx]
mov word [ecx + 2], ax
mov cx, word [ebp - 0x14]
movzx eax, cx
inc edi
add edx, 4
cmp esi, eax
mov eax, dword [ebp - 0x40]
jb 0x4038f0
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x28]
inc eax
push 1
and eax, 0xfffffffe
push 0
push eax
push dword [esi + 4]
call fcn.00411db2
mov eax, dword [esi + 0xc]
or edx, 0xffffffff
mov ecx, dword [esi + 8]
xor ebx, ebx
sub eax, ecx
mov dword [ebp - 0x24], edx
sar eax, 2
add esp, 0x10
xor edi, edi
mov dword [ebp - 0x3c], ebx
test eax, eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x40], eax
je 0x403aa8
nop dword [eax + eax]
mov esi, dword [ecx + ebx*4]
mov eax, dword [ebp - 0x34]
cmp esi, 0xffffffff
jne 0x403985
or edx, esi
mov dword [ebp - 0x24], edx
jmp 0x403a8c
cmp esi, 0x80000000
jb 0x4039a8
mov ecx, esi
and ecx, 0x3fffffff
cmp eax, 0xffffffff
mov edx, ecx
cmovne ecx, eax
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x34], ecx
jmp 0x403a8c
xor ebx, ebx
cmp edx, 0xffffffff
je 0x4039d5
movzx eax, si
add edx, eax
mov eax, 0x6c16c16d
mov ebx, edx
mov dword [ebp - 0x24], edx
sub ebx, dword [ebp - 0x34]
and ebx, 0x3fffffff
mul ebx
sub ebx, edx
shr ebx, 1
add ebx, edx
shr ebx, 5
shl ebx, 2
shr esi, 0x10
inc esi
nop dword [eax]
mov eax, edi
inc edi
cmp eax, dword [ebp - 0x2c]
je 0x403b3a
mov eax, dword [ebp - 0x28]
push dword [eax + 4]
lea eax, [ebp - 0x18]
push 1
push 2
push eax
call fcn.0041198e
add esp, 0x10
cmp eax, 1
jne 0x403b29
mov ax, word [ebp - 0x18]
mov ecx, 0x1000
cmp ax, cx
jb 0x403b3a
mov ecx, dword [ebp - 0x40]
sub ecx, dword [ebp - 0x20]
movzx edx, ax
sar ecx, 2
lea eax, [edx - 0x1000]
cmp eax, ecx
jae 0x403b3a
cmp dword [ebp - 0x24], 0xffffffff
je 0x403a7d
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x4c], ebx
movzx eax, word [ecx + edx*4 - 0x3ffe]
mov dword [ebp - 0x44], eax
mov ax, word [ecx + edx*4 - 0x4000]
inc ax
movzx eax, ax
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x24]
test ecx, ecx
je 0x403bd7
mov eax, dword [ecx]
lea edx, [ebp - 0x44]
push edx
lea edx, [ebp - 0x48]
push edx
lea edx, [ebp - 0x4c]
push edx
call dword [eax + 8]
sub esi, 1
jne 0x4039e0
mov edx, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x50]
inc ebx
mov dword [ebp - 0x3c], ebx
mov ecx, dword [eax]
mov eax, dword [eax + 4]
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x403970
mov esi, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], edi
jne 0x403b3a
push dword [esi + 4]
mov edi, dword [ebp - 0x54]
lea eax, [ebp - 0x58]
push edi
push 1
push eax
call fcn.0041198e
add esp, 0x10
cmp eax, edi
jne 0x403b29
mov eax, dword [ebp - 0x60]
lea edx, [esi + 8]
mov ebx, dword [ebp - 0x64]
mov edi, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x6c], eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x70], ebx
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x20], ebx
mov ebx, dword [ebp - 0x40]
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x60], ebx
mov ebx, dword [ebp - 0x68]
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x68], ecx
mov ecx, dword [esi + 4]
push eax
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x5c], ebx
call fcn.00404470
add esp, 0x14
jmp 0x40376a
mov ecx, dword [ebp + 0xc]
mov eax, str.CPsiArchiveReader:_Invalid_dictionary
xor bl, bl
mov dword [ecx], eax
mov edi, dword [ebp - 0x64]
jmp 0x403b5e
mov ecx, dword [ebp + 0xc]
mov eax, str.CPsiArchiveReader:_Read_error
xor bl, bl
mov dword [ecx], eax
mov edi, dword [ebp - 0x64]
jmp 0x403b5e
mov ecx, dword [ebp + 0xc]
mov eax, str.CPsiArchiveReader:_Invalid_codelist
xor bl, bl
mov dword [ecx], eax
mov edi, dword [ebp - 0x64]
jmp 0x403b5e
mov ecx, dword [ebp + 0xc]
mov eax, str.CPsiArchiveReader:_Buffer_limit_exceeded
xor bl, bl
mov dword [ecx], eax
mov edi, dword [ebp - 0x64]
jmp 0x403b5e
mov bl, 1
test edi, edi
je 0x403b8e
mov ecx, dword [ebp - 0x5c]
mov eax, edi
sub ecx, edi
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x403b84
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403bdc
push ecx
push edi
call fcn.0040cddf
add esp, 8
mov edx, dword [ebp - 0x20]
test edx, edx
je 0x403bc1
mov ecx, dword [ebp - 0x68]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x403bb7
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403bdc
push ecx
push edx
call fcn.0040cddf
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
call fcn.0040cd5e
call fcn.0041101c
int3