Function at 0x5ba040
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x85d138
mov eax, dword fs:[0]
push eax
sub esp, 0x460
mov eax, dword [0xa5e224]
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 esi, dword [ebp + 8]
mov dword [ebp - 0x444], esi
mov dword [ebp - 0x440], 0
test esi, esi
je 0x5bacfc
mov ecx, str.MaxWidth
mov dword [ebp - 0x30], 0
xor eax, eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 7
mov word [ebp - 0x30], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5ba0b0
sub ecx, edx
sar ecx, 1
push ecx
push str.MaxWidth
lea ecx, [ebp - 0x30]
call fcn.00437780
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x30]
mov dword [ebp - 4], 0
push eax
mov ecx, esi
call fcn.0059e060
push dword [ebp - 0x18]
mov dword [ebp - 0x450], eax
mov dword [ebp - 4], 0xffffffff
call fcn.00805aaa
mov ecx, dword [ebp - 0x1c]
add esp, 4
cmp ecx, 8
jb 0x5ba13f
mov eax, dword [ebp - 0x30]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x5ba135
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
sub eax, 4
cmp eax, 0x1f
ja 0x5bad57
mov eax, edx
push ecx
push eax
call fcn.00800125
add esp, 8
xor eax, eax
mov dword [ebp - 0x20], 0
mov ecx, str.MaxHeight
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x1c], 7
mov word [ebp - 0x30], ax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], 7
lea edx, [ecx + 2]
mov word [ebp - 0x50], ax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5ba170
sub ecx, edx
sar ecx, 1
push ecx
push str.MaxHeight
lea ecx, [ebp - 0x50]
call fcn.00437780
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
lea eax, [ebp - 0x50]
mov dword [ebp - 4], 1
push eax
mov ecx, esi
call fcn.0059e060
push dword [ebp - 0x38]
mov dword [ebp - 0x454], eax
mov dword [ebp - 4], 0xffffffff
call fcn.00805aaa
mov ecx, dword [ebp - 0x3c]
add esp, 4
cmp ecx, 8
jb 0x5ba1ff
mov eax, dword [ebp - 0x50]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x5ba1f5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
sub eax, 4
cmp eax, 0x1f
ja 0x5bad57
mov eax, edx
push ecx
push eax
call fcn.00800125
add esp, 8
xor eax, eax
mov dword [ebp - 0x40], 0
mov ecx, esi
mov dword [ebp - 0x3c], 7
mov word [ebp - 0x50], ax
call fcn.0059d150
lea eax, [ebp - 0x434]
push eax
call fcn.0068bd80
add esp, 4
mov dword [ebp - 0x370], eax
cmp byte [ebp + 0x10], 0
mov dword [ebp - 0x434], 0x5bb860
jne 0x5ba246
mov dword [eax + 8], fcn.00437170
mov eax, dword [ebp - 4]
lea ecx, [ebp - 0x3b0]
push 0xa32c7c
push eax
push 0x802092
push 3
push ecx
call fcn.00802d40
add esp, 0x14
test eax, eax
je 0x5ba59f
cmp byte [ebp + 0x10], 0
je 0x5ba55d
mov ebx, dword [ebp - 0x440]
xor al, al
nop
test al, al
jne 0x5ba2e5
lea eax, [ebp - 0x170]
push 0x8a7570
push eax
call fcn.007373c0
add esp, 8
mov esi, eax
or ebx, 1
mov dword [ebp - 4], 2
cmp dword [0xea5818], 0
mov dword [ebp - 0x440], ebx
je 0x5ba2c7
call sub.KERNEL32.dll_GetCurrentThreadId
cmp eax, dword [0xea5818]
je 0x5ba2c7
call fcn.007423b0
jmp 0x5ba2cc
mov al, byte [0xa5d794]
test al, al
je 0x5ba2e5
push esi
call fcn.00741e40
add esp, 4
mov byte [ebp - 0x435], 1
cmp eax, 1
jae 0x5ba2ec
mov byte [ebp - 0x435], 0
mov dword [ebp - 4], 0xffffffff
test bl, 1
je 0x5ba30c
and ebx, 0xfffffffe
lea ecx, [ebp - 0x170]
mov dword [ebp - 0x440], ebx
call fcn.00436e00
cmp byte [ebp - 0x435], 0
je 0x5ba55d
push str.JPEG:_Couldnt_load___file_is_probably_corrupted.
lea ecx, [ebp - 0x150]
call fcn.00436310
xor eax, eax
mov dword [ebp - 0x130], 0
mov dword [ebp - 4], 3
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x11c], 7
mov word [ebp - 0x130], ax
mov dword [ebp - 0x118], eax
mov dword [ebp - 0x114], eax
mov dword [ebp - 0x110], eax
mov dword [ebp - 0x100], eax
mov dword [ebp - 0xfc], 7
mov word [ebp - 0x110], ax
mov dword [ebp - 0xf8], eax
mov dword [ebp - 0xf4], eax
mov byte [ebp - 4], 5
call fcn.0074abf0
test eax, eax
je 0x5ba3bb
lea ecx, [ebp - 0x130]
push ecx
lea ecx, [ebp - 0x110]
push ecx
lea ecx, [ebp - 0x150]
push ecx
mov ecx, eax
call fcn.0074fa90
mov esi, eax
test esi, esi
jne 0x5ba3cc
lea eax, [ebp - 0x150]
push eax
call fcn.00750db0
add esp, 4
mov esi, eax
call fcn.00737c40
mov dword [ebp - 0x46c], eax
mov byte [ebp - 4], 6
call fcn.00737c40
mov dword [ebp - 0x468], eax
mov byte [ebp - 4], 7
call fcn.00737c40
mov dword [ebp - 0x464], eax
mov dword [ebp - 0x460], esi
mov dword [ebp - 0x45c], 0
push 0x8a7570
push str.wxJPEGHandler::LoadFile
push 0x102
push str.C:_vcpkg_buildtreeswxwidgets_src_v3.2.3_90b1eb06ca.clean_srccommonimagjpeg.cpp
push 1
lea ecx, [ebp - 0x1c0]
mov byte [ebp - 4], 8
call fcn.004cb4d0
mov esi, eax
lea ecx, [ebp - 0x46c]
mov byte [ebp - 4], 9
call fcn.00744ca0
push eax
push esi
call fcn.004cc880
add esp, 8
lea ecx, [ebp - 0x190]
call fcn.00436e00
lea ecx, [ebp - 0x1b8]
call fcn.004cb970
lea ecx, [ebp - 0x46c]
call fcn.00476650
push dword [ebp - 0xf8]
mov byte [ebp - 4], 4
call fcn.00805aaa
mov edx, dword [ebp - 0xfc]
add esp, 4
cmp edx, 8
jb 0x5ba4b8
mov ecx, dword [ebp - 0x110]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5ba4ae
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5bad57
push edx
push ecx
call fcn.00800125
add esp, 8
push dword [ebp - 0x118]
xor eax, eax
mov dword [ebp - 0x100], 0
mov dword [ebp - 0xfc], 7
mov word [ebp - 0x110], ax
mov byte [ebp - 4], 3
call fcn.00805aaa
mov edx, dword [ebp - 0x11c]
add esp, 4
cmp edx, 8
jb 0x5ba527
mov ecx, dword [ebp - 0x130]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5ba51d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5bad57
push edx
push ecx
call fcn.00800125
add esp, 8
xor eax, eax
mov dword [ebp - 0x120], 0
lea ecx, [ebp - 0x150]
mov dword [ebp - 0x11c], 7
mov word [ebp - 0x130], ax
mov dword [ebp - 4], 0xffffffff
call fcn.00436e00
mov al, 1
jmp 0x5ba280
lea eax, [ebp - 0x370]
push eax
mov eax, dword [ebp - 0x358]
mov eax, dword [eax + 0x18]
call eax
lea eax, [ebp - 0x370]
push eax
call fcn.0068bfb0
mov esi, dword [ebp - 0x444]
add esp, 8
mov ecx, esi
call fcn.0059edc0
test al, al
je 0x5bad37
mov ecx, esi
call fcn.0059d150
jmp 0x5bad37
push 0x1b0
lea eax, [ebp - 0x370]
push 0x3e
push eax
call fcn.0068c3e0
mov esi, dword [ebp - 0x358]
add esp, 0xc
test esi, esi
jne 0x5ba5de
push 0x24
lea eax, [ebp - 0x370]
push esi
push eax
mov eax, dword [ebp - 0x36c]
mov eax, dword [eax]
call eax
mov esi, eax
add esp, 0xc
mov dword [ebp - 0x358], esi
push 0x800
mov dword [esi + 4], 0
call fcn.008008c1
mov dword [esi + 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x20], eax
lea eax, [ebp - 0x370]
push 1
push eax
mov dword [esi], 0
mov dword [esi + 8], fcn.00437170
mov dword [esi + 0xc], 0x5bb880
mov dword [esi + 0x10], 0x5bb900
mov dword [esi + 0x14], 0x68e960
mov dword [esi + 0x18], 0x5bb960
call fcn.0068c660
mov eax, dword [ebp - 0x344]
add esp, 0xc
cmp eax, 4
je 0x5ba658
cmp eax, 5
je 0x5ba658
mov dword [ebp - 0x344], 2
mov dword [ebp - 0x43c], 3
jmp 0x5ba66c
mov dword [ebp - 0x344], 4
mov dword [ebp - 0x43c], 4
mov edi, dword [ebp - 0x450]
mov esi, dword [ebp - 0x454]
test edi, edi
jne 0x5ba680
test esi, esi
je 0x5ba6ba
mov ebx, dword [ebp - 0x350]
mov ecx, dword [ebp - 0x33c]
nop dword [eax]
test edi, edi
je 0x5ba6a2
mov eax, dword [ebp - 0x354]
xor edx, edx
div ecx
cmp eax, edi
ja 0x5ba6b0
test esi, esi
je 0x5ba6b4
xor edx, edx
mov eax, ebx
div ecx
cmp eax, esi
jbe 0x5ba6b4
add ecx, ecx
jmp 0x5ba690
mov dword [ebp - 0x33c], ecx
lea eax, [ebp - 0x370]
push eax
call fcn.0068d3e0
mov edi, dword [ebp - 0x444]
add esp, 4
mov ecx, edi
push 1
push dword [ebp - 0x310]
push dword [ebp - 0x314]
call fcn.0059ce70
mov ecx, edi
call fcn.0059edc0
test al, al
jne 0x5ba70f
lea eax, [ebp - 0x370]
push eax
call fcn.0068c550
lea eax, [ebp - 0x370]
push eax
call fcn.0068bfb0
add esp, 8
jmp 0x5bad37
push 0
mov ecx, edi
call fcn.005a6d00
mov ecx, edi
call fcn.0059dcf0
mov esi, dword [ebp - 0x314]
mov ebx, eax
imul esi, dword [ebp - 0x43c]
lea eax, [ebp - 0x370]
mov ecx, dword [ebp - 0x36c]
push 1
push esi
push 1
push eax
mov eax, dword [ecx + 8]
mov dword [ebp - 0x458], esi
call eax
mov ecx, dword [ebp - 0x310]
add esp, 0x10
mov dword [ebp - 0x44c], eax
cmp dword [ebp - 0x2f8], ecx
jae 0x5ba8cf
push 1
push eax
lea eax, [ebp - 0x370]
push eax
call fcn.0068d320
mov eax, dword [ebp - 0x44c]
add esp, 0xc
cmp dword [ebp - 0x344], 2
mov eax, dword [eax]
mov dword [ebp - 0x43c], eax
jne 0x5ba7a1
push esi
push eax
push ebx
call fcn.008020c0
add esp, 0xc
add ebx, esi
jmp 0x5ba8b1
cmp dword [ebp - 0x314], 0
mov dword [ebp - 0x448], 0
jbe 0x5ba8b1
nop dword [eax + eax]
movzx esi, byte [eax + 3]
mov ecx, 0xff
movzx eax, byte [eax]
mov edi, 0xff
sub ecx, eax
sub edi, esi
imul ecx, esi
mov eax, 0x80808081
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + edi]
or al, 0xff
sub al, dl
cmp edx, 0xff
movzx eax, al
cmovle ecx, eax
mov eax, dword [ebp - 0x43c]
mov byte [ebx], cl
mov ecx, 0xff
movzx eax, byte [eax + 1]
sub ecx, eax
mov eax, 0x80808081
imul ecx, esi
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + edi]
or al, 0xff
sub al, dl
cmp edx, 0xff
movzx eax, al
cmovle ecx, eax
mov eax, dword [ebp - 0x43c]
mov byte [ebx + 1], cl
mov ecx, 0xff
movzx eax, byte [eax + 2]
sub ecx, eax
mov eax, 0x80808081
imul ecx, esi
imul ecx
add edx, ecx
xor ecx, ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + edi]
or al, 0xff
sub al, dl
cmp edx, 0xff
movzx eax, al
cmovle ecx, eax
mov eax, dword [ebp - 0x43c]
mov byte [ebx + 2], cl
add eax, 4
mov ecx, dword [ebp - 0x448]
add ebx, 3
inc ecx
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x448], ecx
cmp ecx, dword [ebp - 0x314]
jb 0x5ba7c0
mov esi, dword [ebp - 0x458]
mov ecx, dword [ebp - 0x310]
mov eax, dword [ebp - 0x44c]
cmp dword [ebp - 0x2f8], ecx
jb 0x5ba766
mov edi, dword [ebp - 0x444]
cmp byte [ebp - 0x270], 0
je 0x5bab20
push 0xb
xor eax, eax
mov dword [ebp - 0x70], 0
push str.ResolutionX
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
call fcn.00437780
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
movzx eax, word [ebp - 0x26c]
mov ecx, edi
push eax
lea eax, [ebp - 0x70]
mov dword [ebp - 4], 0xa
push eax
call fcn.005a78f0
push dword [ebp - 0x58]
mov dword [ebp - 4], 0xffffffff
call fcn.00805aaa
mov edx, dword [ebp - 0x5c]
add esp, 4
cmp edx, 8
jb 0x5ba97a
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5ba970
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5bad57
push edx
push ecx
call fcn.00800125
add esp, 8
xor eax, eax
mov dword [ebp - 0x60], 0
push 0xb
mov dword [ebp - 0x90], eax
lea ecx, [ebp - 0x90]
push str.ResolutionY
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], 7
mov word [ebp - 0x90], ax
call fcn.00437780
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
movzx eax, word [ebp - 0x26a]
mov ecx, edi
push eax
lea eax, [ebp - 0x90]
mov dword [ebp - 4], 0xb
push eax
call fcn.005a78f0
push dword [ebp - 0x78]
mov dword [ebp - 4], 0xffffffff
call fcn.00805aaa
mov edx, dword [ebp - 0x7c]
add esp, 4
cmp edx, 8
jb 0x5baa31
mov ecx, dword [ebp - 0x90]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5baa27
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5bad5c
push edx
push ecx
call fcn.00800125
add esp, 8
xor eax, eax
mov dword [ebp - 0x80], 0
push 0xe
mov dword [ebp - 0xb0], eax
lea ecx, [ebp - 0xb0]
push 0x8ce090
mov dword [ebp - 0x7c], 7
mov word [ebp - 0x90], ax
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], 7
mov word [ebp - 0xb0], ax
call fcn.00437780
mov dword [ebp - 0x98], 0
mov dword [ebp - 0x94], 0
movzx eax, byte [ebp - 0x26d]
mov ecx, edi
push eax
lea eax, [ebp - 0xb0]
mov dword [ebp - 4], 0xc
push eax
call fcn.005a78f0
push dword [ebp - 0x98]
mov dword [ebp - 4], 0xffffffff
call fcn.00805aaa
mov edx, dword [ebp - 0x9c]
add esp, 4
cmp edx, 8
jb 0x5baafd
mov ecx, dword [ebp - 0xb0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5baaf3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5bad61
push edx
push ecx
call fcn.00800125
add esp, 8
mov ecx, dword [ebp - 0x310]
xor eax, eax
mov dword [ebp - 0xa0], 0
mov dword [ebp - 0x9c], 7
mov word [ebp - 0xb0], ax
mov eax, dword [ebp - 0x354]
cmp eax, dword [ebp - 0x314]
jne 0x5bab3a
cmp dword [ebp - 0x350], ecx
je 0x5bacdd
push 0xd
xor eax, eax
mov dword [ebp - 0xd0], 0
push str.OriginalWidth
lea ecx, [ebp - 0xd0]
mov dword [ebp - 0xc0], 0
mov dword [ebp - 0xbc], 7
mov word [ebp - 0xd0], ax
call fcn.00437780
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xb4], 0
push dword [ebp - 0x354]
lea eax, [ebp - 0xd0]
mov dword [ebp - 4], 0xd
push eax
mov ecx, edi
call fcn.005a78f0
push dword [ebp - 0xb8]
mov dword [ebp - 4], 0xffffffff
call fcn.00805aaa
mov edx, dword [ebp - 0xbc]
add esp, 4
cmp edx, 8
jb 0x5babf7
mov ecx, dword [ebp - 0xd0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5babed
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5bad66
push edx
push ecx
call fcn.00800125
add esp, 8
xor eax, eax
mov dword [ebp - 0xc0], 0
push 0xe
mov dword [ebp - 0xf0], eax
lea ecx, [ebp - 0xf0]
push str.OriginalHeight
mov dword [ebp - 0xbc], 7
mov word [ebp - 0xd0], ax
mov dword [ebp - 0xe0], eax
mov dword [ebp - 0xdc], 7
mov word [ebp - 0xf0], ax
call fcn.00437780
mov dword [ebp - 0xd8], 0
mov dword [ebp - 0xd4], 0
push dword [ebp - 0x350]
lea eax, [ebp - 0xf0]
mov dword [ebp - 4], 0xe
push eax
mov ecx, edi
call fcn.005a78f0
push dword [ebp - 0xd8]
call fcn.00805aaa
mov edx, dword [ebp - 0xdc]
add esp, 4
cmp edx, 8
jb 0x5bacc0
mov ecx, dword [ebp - 0xf0]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5bacb6
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x5bad6b
push edx
push ecx
call fcn.00800125
add esp, 8
xor eax, eax
mov dword [ebp - 0xe0], 0
mov dword [ebp - 0xdc], 7
mov word [ebp - 0xf0], ax
lea eax, [ebp - 0x370]
push eax
call fcn.0068c550
lea eax, [ebp - 0x370]
push eax
call fcn.0068bfb0
add esp, 8
mov al, 1
jmp 0x5bad39
cmp dword [0xa5d6f8], 0
je 0x5bad37
push str.NULL_image_pointer
push str._image_
push str.wxJPEGHandler::LoadFile
push 0xea
push str.C:_vcpkg_buildtreeswxwidgets_src_v3.2.3_90b1eb06ca.clean_srccommonimagjpeg.cpp
call fcn.0073ce40
add esp, 0x14
cmp byte [0xea569c], 0
je 0x5bad37
mov byte [0xea569c], 0
int3
xor al, al
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.00800392
mov esp, ebp
pop ebp
ret 0x10
call fcn.00805a59
call fcn.00805a59
call fcn.00805a59
call fcn.00805a59
call fcn.00805a59
int3