Function at 0x542960
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x160
mov eax, dword [0x5923b4]
xor eax, esp
mov dword [esp + 0x15c], eax
mov eax, dword [esp + 0x168]
push ebx
push ebp
mov ebp, dword [esp + 0x16c]
push esi
push edi
push ebp
mov dword [esp + 0x14], eax
call fcn.004bbe10
mov ecx, dword [ebp + 0x1b0]
mov esi, eax
add esp, 4
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x14], 0
mov ecx, dword [ecx + 0x1cb8]
mov edi, dword [ecx + 0x548]
test esi, esi
je 0x5429d2
movsx eax, byte [esi]
mov ecx, 0x14
cdq
idiv ecx
mov dword [esp + 0x24], edx
push 0xe
push ebp
call fcn.004bb4a0
add esp, 8
cmp eax, 0xdead
je 0x5429f6
push 0x14
push ebp
call fcn.004bb4a0
add esp, 8
cmp eax, 0x2655
jne 0x542a25
test esi, esi
je 0x542a2d
cmp byte [esi], 0
je 0x542a2d
push 0
push str.demo
push esi
call fcn.00414c70
add esp, 0xc
test eax, eax
jne 0x542a2d
push 0x1b
push ebp
call fcn.004bb4a0
add esp, 8
cmp eax, 0x836a
jne 0x542a2d
mov dword [esp + 0x28], 1
mov eax, dword [ebp + 0x1b0]
mov eax, dword [eax + 0x1cb8]
mov ecx, dword [eax + 0x548]
test ecx, ecx
je 0x542bdd
cmp dword [eax + 0x560], 1
je 0x542bdd
mov esi, dword [eax + 0x544]
test esi, esi
je 0x542beb
test edi, edi
je 0x542a80
mov eax, dword [esi + 0x94]
cmp eax, dword [ecx + 4]
je 0x542a80
mov esi, dword [esi + 0x9c]
test esi, esi
jne 0x542a62
jmp 0x542beb
test esi, esi
je 0x542beb
test byte [esi + 0x98], 8
mov edi, dword [esi + 4]
mov dword [esp + 0x14], edi
je 0x542beb
cmp dword [esi], 0
jne 0x542aa9
test edi, edi
je 0x542beb
cmp dword [0x59ded4], 0
jne 0x542ac6
push dword [0x5937ac]
push ebp
call fcn.004bad00
add esp, 8
mov dword [0x59ded4], eax
push dword [0x5937b0]
push ebp
call fcn.004bad00
mov edx, dword [esi + 0x90]
mov ebx, eax
mov ecx, dword [esp + 0x188]
mov eax, dword [0x5937b0]
mov edi, dword [esp + 0x18]
push 0x5937b0
mov ecx, dword [ecx + 0x34]
push ebx
mov dword [edx + 0x88], ecx
push dword [esi + 0x90]
mov dword [esp + 0x30], eax
push dword [esp + 0x190]
push edi
push ebp
call dword [esp + 0x34]
add esp, 0x20
test eax, eax
je 0x542b7a
mov eax, dword [esp + 0x1c]
cmp dword [0x5937b0], eax
je 0x542b73
push dword [0x59ded4]
call fcn.004bace0
push ebx
call fcn.004bace0
push dword [0x5937ac]
push ebp
call fcn.004bad00
push dword [0x5937b0]
mov dword [0x59ded4], eax
push ebp
call fcn.004bad00
push 0x5937b0
mov ebx, eax
push ebx
push dword [esi + 0x90]
push dword [esp + 0x1a0]
push edi
push ebp
call dword [esp + 0x44]
add esp, 0x30
test eax, eax
je 0x542b7a
xor eax, eax
jmp 0x543480
mov esi, dword [0x59ded4]
xor edi, edi
cmp dword [0x5937b0], edi
jle 0x542bc7
lea ebx, [ebx]
mov eax, edi
and eax, 0x80000001
jns 0x542b9e
dec eax
or eax, 0xfffffffe
inc eax
jne 0x542ba8
test edi, edi
je 0x542ba8
mov byte [esi], 0x20
inc esi
movzx eax, byte [edi + ebx]
push eax
push str._02X
push esi
call fcn.00401741
inc edi
add esp, 0xc
add esi, 2
cmp edi, dword [0x5937b0]
jl 0x542b90
push ebx
mov byte [esi], 0
call fcn.004bace0
mov eax, dword [0x59ded4]
add esp, 4
jmp 0x543480
mov eax, dword [eax + 0x540]
test eax, eax
je 0x542beb
mov dword [esp + 0x14], eax
push 0
push 8
push 0
push 0x59def8
call fcn.00414af0
mov ebx, dword [esp + 0x18c]
add esp, 0x10
movdqa xmm0, xmmword [0x575650]
mov eax, ebx
cdq
and edx, 7
mov dword [esp + 0xcc], 8
movdqu xmmword [esp + 0x84], xmm0
mov dword [esp + 0x68], 5
movdqa xmm0, xmmword [0x575640]
lea ecx, [edx + eax]
mov dword [esp + 0x15c], 0xa
sar ecx, 3
mov dword [esp + 0x18], ecx
mov dword [esp + 0x94], 5
mov dword [esp + 0x6c], 3
mov dword [esp + 0x70], 0
mov dword [esp + 0xd8], 5
mov dword [esp + 0xdc], 6
mov dword [esp + 0xf8], 9
mov dword [esp + 0xfc], 0
mov dword [esp + 0x100], 4
mov dword [esp + 0x7c], 1
mov dword [esp + 0x140], 2
mov dword [esp + 0xe0], 1
mov dword [esp + 0x144], 4
mov dword [esp + 0x3c], 9
mov dword [esp + 0x40], 8
mov dword [esp + 0xf0], 3
mov dword [esp + 0x44], 3
mov dword [esp + 0x130], 5
mov dword [esp + 0x134], 1
mov dword [esp + 0x148], 8
mov dword [esp + 0x30], 5
mov dword [esp + 0x34], 4
mov dword [esp + 0x160], 3
mov dword [esp + 0x168], 1
mov dword [esp + 0x48], 1
mov dword [esp + 0x4c], 8
mov dword [esp + 0x80], 0xa
mov dword [esp + 0x98], 0xb
mov dword [esp + 0xd4], 2
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa4], 9
mov dword [esp + 0x154], 1
mov dword [esp + 0x50], 1
mov dword [esp + 0x78], 7
mov dword [esp + 0x14c], 5
mov dword [esp + 0xf4], 8
mov dword [esp + 0x110], 0xa
mov dword [esp + 0x114], 8
mov dword [esp + 0x150], 0
mov dword [esp + 0x64], 0xa
mov dword [esp + 0x54], 2
mov dword [esp + 0x2c], 3
mov dword [esp + 0x138], 0
mov dword [esp + 0x158], 4
mov dword [esp + 0x13c], 0
mov dword [esp + 0x38], 0xb
mov dword [esp + 0xe8], 9
mov dword [esp + 0x58], 5
mov dword [esp + 0x5c], 2
mov dword [esp + 0x60], 0xb
mov dword [esp + 0xb0], 4
mov dword [esp + 0xd0], 4
mov dword [esp + 0xb4], 1
movdqu xmmword [esp + 0xbc], xmm0
mov dword [esp + 0x164], 5
mov dword [esp + 0xa8], 4
mov dword [esp + 0xac], 0
mov dword [esp + 0xa0], 1
mov dword [esp + 0x104], 2
mov dword [esp + 0x108], 0xa
mov dword [esp + 0x118], 7
mov dword [esp + 0xb8], 0xa
mov dword [esp + 0x11c], 1
mov eax, dword [ebp + 0x1b0]
mov dword [esp + 0x120], 0xb
mov dword [esp + 0x124], 0
mov dword [esp + 0xe4], 0
cmp dword [eax + 0xcf4], 0
mov dword [esp + 0x128], 3
mov dword [esp + 0x12c], 6
mov dword [esp + 0x10c], 3
mov dword [esp + 0xec], 4
mov dword [esp + 0x74], 1
jne 0x542f4e
mov dword [eax + 0xcf4], 0x113e
mov eax, dword [ebp + 0x1b0]
push dword [eax + 0xcf4]
push ebp
call fcn.004bad00
mov ecx, dword [ebp + 0x1b0]
add esp, 8
mov dword [ecx + 0xcf0], eax
mov ecx, dword [esp + 0x18]
mov eax, ebx
and eax, 0x80000007
jns 0x542f5c
dec eax
or eax, 0xfffffff8
inc eax
je 0x542fd0
mov eax, dword [ebp + 0x1b0]
lea esi, [ebx + 8]
inc ecx
mov dword [esp + 0x18], ecx
mov edi, dword [eax + 0xcf0]
cmp dword [eax + 0xcf4], esi
jge 0x542fab
push edi
call fcn.004bace0
mov eax, dword [ebp + 0x1b0]
mov dword [eax + 0xcf4], esi
mov esi, dword [ebp + 0x1b0]
push dword [esi + 0xcf4]
call fcn.00444a76
mov edi, eax
add esp, 8
mov dword [esi + 0xcf0], edi
lea esi, [ebx + 8]
test edi, edi
je 0x542b73
push 0
push esi
push 0
push edi
call fcn.00414af0
push 0
push ebx
push dword [esp + 0x28]
push edi
call fcn.00414a10
add esp, 0x20
jmp 0x542fd4
mov edi, dword [esp + 0x10]
xor ecx, ecx
mov dword [esp + 0x1c], ecx
cmp dword [esp + 0x18], ecx
jle 0x54334a
mov eax, dword [esp + 0x24]
lea ebx, [esp + 0x2c]
shl eax, 4
lea esi, [edi + 2]
add ebx, eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], ebx
lea esp, [esp]
mov al, byte [esi - 2]
xor byte [0x59def8], al
mov al, byte [esi - 1]
xor byte [0x59def9], al
mov al, byte [esi]
xor byte [0x59defa], al
mov al, byte [esi + 1]
xor byte [0x59defb], al
mov al, byte [esi + 2]
xor byte [0x59defc], al
mov al, byte [esi + 3]
xor byte [0x59defd], al
mov al, byte [esi + 4]
xor byte [0x59defe], al
mov al, byte [esi + 5]
xor byte [0x59deff], al
test ecx, ecx
jne 0x54328b
cmp dword [esp + 0x14], ecx
jne 0x5431bc
push 1
push ebp
call fcn.004ce010
add esp, 8
test eax, eax
je 0x5431bc
mov eax, dword [ebp + 0x1b0]
mov edi, dword [ebx + 0xc]
mov ebx, dword [ebx + 8]
mov ecx, dword [eax + 0x1cb8]
mov eax, dword [esp + 0x10]
movzx edx, byte [edi + ecx + 0x530]
mov esi, dword [eax + 4]
movzx eax, byte [ebx + ecx + 0x530]
shl edx, 8
xor edx, eax
movzx eax, byte [esi + ecx + 0x530]
mov esi, dword [esp + 0x10]
shl edx, 8
xor edx, eax
shl edx, 8
mov eax, dword [esi]
mov esi, 0x59def9
movzx eax, byte [eax + ecx + 0x530]
xor edx, eax
mov eax, dword [esp + 0x180]
xor edx, dword [eax + 4]
xor byte [0x59def8], dl
cmp edx, 0xff
jg 0x5430df
cmp edx, 0xffffff00
jge 0x5430ef
mov eax, edx
mov esi, 0x59defa
sar eax, 8
xor byte [0x59def9], al
cmp edx, 0x7d00
jg 0x5430ff
cmp edx, 0xffff8300
jge 0x543107
mov eax, edx
sar eax, 0x10
xor byte [esi], al
inc esi
cmp edx, 0xf42400
jg 0x543117
cmp edx, 0xff0bdc00
jge 0x54311d
sar edx, 0x18
xor byte [esi], dl
inc esi
mov eax, dword [ebp + 0x1b0]
mov ecx, dword [eax + 0x1cb8]
movzx eax, byte [ecx + ebx + 0x530]
movzx edx, byte [ecx + edi + 0x530]
mov ebx, dword [esp + 0x10]
shl edx, 8
xor edx, eax
shl edx, 8
mov eax, dword [ebx + 4]
movzx eax, byte [ecx + eax + 0x530]
xor edx, eax
mov eax, dword [ebx]
shl edx, 8
movzx eax, byte [ecx + eax + 0x530]
xor edx, eax
mov eax, dword [esp + 0x180]
xor edx, dword [eax + 8]
xor byte [esi], dl
inc esi
cmp edx, 0xff
jg 0x54317e
cmp edx, 0xffffff00
jge 0x543186
mov eax, edx
sar eax, 8
xor byte [esi], al
inc esi
cmp edx, 0x7d00
jg 0x543196
cmp edx, 0xffff8300
jge 0x54319e
mov eax, edx
sar eax, 0x10
xor byte [esi], al
inc esi
cmp edx, 0xf42400
jg 0x5431b2
cmp edx, 0xff0bdc00
jge 0x543287
sar edx, 0x18
xor byte [esi], dl
jmp 0x543287
xor esi, esi
mov edi, edi
mov ebx, dword [esp + 0x180]
mov edi, esi
and edi, 3
mov edx, esi
shr edx, 2
mov eax, 0xff
push 1
push ebp
lea ecx, [edi*8]
mov ebx, dword [ebx + edx*4 + 4]
shl eax, cl
and ebx, eax
mov eax, dword [esp + 0x2c]
shr ebx, cl
mov ecx, dword [ebp + 0x1b0]
lea eax, [edi + eax*4]
mov edx, dword [esp + eax*4 + 0x34]
mov eax, dword [ecx + 0x1cb8]
xor bl, byte [edx + eax + 0x530]
xor byte [esi + 0x59def8], bl
call fcn.004ce010
add esp, 8
test eax, eax
jne 0x54327d
movzx ecx, byte [esi + 0x59def8]
movsx edx, cl
and edx, 1
movsx eax, cl
and eax, 2
shl edx, 7
shl eax, 5
or dl, al
movsx eax, cl
and eax, 4
shl eax, 3
or dl, al
movsx eax, cl
and eax, 8
add eax, eax
or dl, al
movsx eax, cl
and eax, 0x10
shr eax, 1
or dl, al
movsx eax, cl
and eax, 0x20
shr eax, 3
or dl, al
movsx eax, cl
and eax, 0x40
shr eax, 5
or dl, al
test cl, 0x80
mov eax, 0
setne al
or dl, al
mov byte [esi + 0x59def8], dl
inc esi
cmp esi, 8
jl 0x5431c0
mov esi, dword [esp + 0x20]
push 1
push ebp
call fcn.004ce010
add esp, 8
test eax, eax
jne 0x5432af
cmp dword [esp + 0x28], eax
jne 0x5432af
push 0x59def8
call fcn.00545ce0
add esp, 4
jmp 0x54332c
mov dl, byte [0x59defc]
mov ch, byte [0x59def8]
mov al, dl
add al, byte [0x59deff]
mov bl, byte [0x59defb]
mov dh, byte [0x59def9]
mov bh, byte [0x59defa]
mov byte [0x59def8], al
add dl, bh
mov al, byte [0x59defd]
not dl
add al, bl
mov byte [0x59defa], dl
add bl, byte [0x59defe]
mov byte [0x59def9], al
mov al, ch
add al, byte [0x59defd]
add ch, byte [0x59deff]
mov byte [0x59defb], al
mov al, dh
add al, byte [0x59defe]
add bh, dh
not al
mov byte [0x59defc], bl
mov byte [0x59defd], al
mov byte [0x59defe], ch
mov byte [0x59deff], bh
mov ecx, dword [esp + 0x1c]
add esi, 8
mov ebx, dword [esp + 0x10]
inc ecx
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], ecx
cmp ecx, dword [esp + 0x18]
jl 0x543000
mov ebx, dword [esp + 0x184]
cmp ebx, 0x66d8b337
jne 0x543433
movzx ecx, byte [0x59deff]
movsx ebx, cl
and ebx, 1
movsx eax, cl
and eax, 2
shl ebx, 7
shl eax, 5
or bl, al
movsx eax, cl
and eax, 4
shl eax, 3
or bl, al
movsx eax, cl
and eax, 8
add eax, eax
or bl, al
movsx eax, cl
and eax, 0x10
shr eax, 1
or bl, al
movsx eax, cl
and eax, 0x20
shr eax, 3
or bl, al
movsx eax, cl
and eax, 0x40
shr eax, 5
or bl, al
test cl, 0x80
movzx ecx, byte [0x59defe]
mov eax, 0
setne al
movsx edx, cl
or bl, al
mov word [0x59defe], 0
and edx, 1
movsx eax, cl
and eax, 2
shl edx, 7
shl eax, 5
or dl, al
movsx eax, cl
and eax, 4
shl eax, 3
or dl, al
movsx eax, cl
and eax, 8
add eax, eax
or dl, al
movsx eax, cl
and eax, 0x10
shr eax, 1
or dl, al
movsx eax, cl
and eax, 0x20
shr eax, 3
or dl, al
movsx eax, cl
and eax, 0x40
shr eax, 5
or dl, al
test cl, 0x80
mov eax, 0
setne al
add byte [0x59def8], bl
mov ebx, dword [esp + 0x184]
or dl, al
add byte [0x59def9], dl
cmp dword [esp + 0x14], 0
je 0x543471
cmp ebx, 0x66d8b337
mov edi, 8
mov eax, 6
cmove edi, eax
xor esi, esi
test edi, edi
jle 0x543471
mov ebx, dword [esp + 0x14]
push esi
lea eax, [esi + 0x59def8]
push eax
push ebp
call ebx
inc esi
add esp, 0xc
cmp esi, edi
jl 0x543457
mov ebx, dword [esp + 0x184]
push ebx
push 0x59def8
push ebp
call fcn.00542620
add esp, 0xc
mov ecx, dword [esp + 0x16c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00424604
add esp, 0x160
ret