Function at 0x422c89
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc60
mov eax, edx
mov edx, ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x2c], ecx
test ecx, ecx
je 0x42325e
lea esi, [esp + 0xa0]
mov ecx, esi
push eax
call fcn.004708d0
add esp, 4
cmp dword [esi], 2
jne 0x422cee
mov eax, dword [esp + 0xa4]
mov ecx, dword [esp + 0xa8]
mov dword [esp + 0x304], ecx
mov dword [esp + 0x300], eax
mov dword [esp + 0x2fc], 2
jmp 0x423252
lea edi, [esp + 0x2fc]
push 0x25c
push esi
push edi
call fcn.0047eb10
add esp, 0xc
cmp dword [edi], 2
je 0x423252
lea esi, [esp + 0x7ac]
push 0x25c
push edi
push esi
call fcn.0047eb10
add esp, 0xc
lea edi, [esp + 0xa0]
mov ecx, edi
mov edx, esi
call fcn.004697c0
cmp dword [edi], 0
je 0x423266
lea esi, [esp + 0xa4]
dec dword [esp + 0x2c]
lea edi, [esp + 0x558]
push 0x254
push esi
push edi
call fcn.0047eb10
add esp, 0xc
cmp dword [esp + 0x558], 0
je 0x42303a
push 0x254
push esi
lea esi, [esp + 0xa10]
push esi
call fcn.0047eb10
add esp, 0xc
lea ecx, [esp + 0x90]
mov edx, esi
call fcn.00469a30
mov ebx, dword [esp + 0x94]
mov esi, dword [esp + 0x98]
mov ecx, ebx
mov edx, esi
call fcn.0046aca0
test al, al
je 0x422de6
lea ecx, [esp + 0x30]
mov edx, ebx
push esi
call fcn.0046d910
add esp, 4
mov esi, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov ecx, esi
push dword [ebp + 0xc]
push dword [esp + 0x30]
call fcn.00422c89
add esp, 8
test dword [esp + 0x30], 0x7fffffff
je 0x422feb
push esi
jmp 0x422fdd
mov ecx, ebx
mov edx, esi
call fcn.0046d550
test al, al
je 0x422feb
mov ecx, ebx
mov edx, esi
call fcn.0046ab80
mov dword [esp + 4], edx
test eax, eax
je 0x422feb
mov esi, eax
lea eax, [0x498d3e]
mov dword [esp + 0x30], eax
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x30], 0xbe596d27
mov edx, dword [esp + 0x30]
call fcn.004272d0
xor ecx, ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], ecx
mov dl, 1
movzx ebx, byte [ecx + 0x4a5f54]
mov edi, ecx
or edi, 1
movzx edi, byte [edi + 0x4a5f54]
shl edi, 8
or edi, ebx
mov ebx, ecx
or ebx, 2
movzx ebx, byte [ebx + 0x4a5f54]
shl ebx, 0x10
or edi, ebx
mov ebx, ecx
or ebx, 3
movzx ebx, byte [ebx + 0x4a5f54]
shl ebx, 0x18
or edi, ebx
xor edi, dword [eax + ecx]
mov dword [esp + ecx + 0x30], edi
mov ecx, 4
test dl, 1
mov edx, 0
jne 0x422e3d
movzx eax, word [eax + 8]
xor eax, 0x2c7e
movsd xmm0, qword [esp + 0x30]
movsd qword [esp + 0x20], xmm0
mov word [esp + 0x28], ax
lea ecx, [esp + 0x10]
mov edx, esi
push 0xa
lea eax, [esp + 0x24]
push eax
push dword [esp + 0xc]
call fcn.0046d460
add esp, 0xc
mov ebx, dword [esp + 0x14]
lea edi, [esp + 0x30]
mov ecx, edi
mov edx, ebx
push dword [esp + 0x18]
call fcn.0046ae00
add esp, 4
mov eax, dword [esp + 0x30]
xor eax, 2
or eax, dword [esp + 0x34]
je 0x422fc8
cmp dword [esp + 0x10], 0
je 0x422eff
push ebx
push 0
push dword [0x4c0b18]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea eax, [0x49d479]
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x30], 0xdc8aaee9
mov edx, dword [esp + 0x30]
call fcn.004271ab
xor ecx, ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x30], ecx
mov dl, 1
movzx ebx, byte [ecx + 0x4a5f5e]
mov edi, ecx
or edi, 1
movzx edi, byte [edi + 0x4a5f5e]
shl edi, 8
or edi, ebx
mov ebx, ecx
or ebx, 2
movzx ebx, byte [ebx + 0x4a5f5e]
shl ebx, 0x10
or edi, ebx
mov ebx, ecx
or ebx, 3
movzx ebx, byte [ebx + 0x4a5f5e]
shl ebx, 0x18
or edi, ebx
xor edi, dword [eax + ecx]
mov dword [esp + ecx + 0x30], edi
mov ecx, 4
test dl, 1
mov edx, 0
jne 0x422f2a
movsd xmm0, qword [esp + 0x30]
movsd qword [esp + 0x20], xmm0
lea ecx, [esp + 0x10]
mov edx, esi
push 8
lea eax, [esp + 0x24]
push eax
push dword [esp + 0xc]
call fcn.0046d460
add esp, 0xc
mov ebx, dword [esp + 0x14]
lea edi, [esp + 0x30]
mov ecx, edi
mov edx, ebx
push dword [esp + 0x18]
call fcn.0046ae00
add esp, 4
mov eax, dword [esp + 0x30]
xor eax, 2
or eax, dword [esp + 0x34]
jne 0x423067
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
call fcn.0045c6d8
cmp dword [esp + 0x10], 0
je 0x422feb
push ebx
push 0
push dword [0x4c0b18]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esp + 0x90], 0
je 0x42300a
push dword [esp + 0x94]
push 0
push dword [0x4c0b18]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0xa08]
lock dec dword [eax]
lea esi, [esp + 0xa4]
lea edi, [esp + 0x558]
jne 0x423030
mov ecx, dword [esp + 0xa08]
call fcn.00477828
cmp dword [esp + 0x558], 0
jne 0x423041
mov ecx, edi
call fcn.0041292c
lea ecx, [esp + 0xa0]
lea edx, [esp + 0x7ac]
call fcn.004697c0
cmp dword [esp + 0xa0], 0
jne 0x422d4e
jmp 0x42323a
cmp dword [esp + 0x10], 0
je 0x42307d
push ebx
push 0
push dword [0x4c0b18]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, edi
mov edx, esi
push dword [esp + 4]
call fcn.0046d910
add esp, 4
mov eax, dword [esp + 0x34]
mov dword [esp + 8], eax
mov edi, dword [esp + 0x38]
mov ecx, edi
xor edx, edx
call fcn.00478b38
mov dword [esp + 0xc], eax
mov ebx, edx
push edi
push dword [esp + 0xc]
push edx
call fcn.0047eb10
add esp, 0xc
mov ecx, dword [ebp + 0xc]
mov edx, ebx
push edi
call fcn.004450dd
add esp, 4
cmp dword [esp + 0xc], 0
je 0x4230de
push ebx
push 0
push dword [0x4c0b18]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
mov ecx, dword [esp + 0x30]
cmp ecx, 0x80000000
je 0x423104
test ecx, ecx
je 0x423104
push dword [esp + 0x34]
push 0
push dword [0x4c0b18]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, ebx
test al, al
jne 0x422feb
mov ecx, esi
mov edx, dword [esp + 4]
call fcn.0046d2c0
test eax, eax
je 0x422feb
mov edi, edx
lea ecx, [esp + 0x78]
mov edx, eax
push edi
call fcn.0046d910
add esp, 4
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xc], eax
mov edi, dword [esp + 0x80]
mov ecx, edi
xor edx, edx
call fcn.00478b38
mov dword [esp + 8], eax
mov ebx, edx
push edi
push dword [esp + 0x10]
push edx
call fcn.0047eb10
add esp, 0xc
mov eax, dword [esp + 8]
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], edi
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x40], 0x20
mov byte [esp + 0x50], 3
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
lea eax, [esp + 0x10]
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], 0x4a5874
mov ecx, esi
mov edx, dword [esp + 4]
lea esi, [esp + 0x30]
push esi
call fcn.00464aa0
add esp, 4
test al, al
jne 0x423274
movsd xmm0, qword [esp + 0x10]
movsd qword [esp + 0x20], xmm0
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], eax
mov ecx, esi
mov edx, dword [ebp + 0xc]
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x88]
push eax
call fcn.004451e2
add esp, 8
mov eax, dword [esp + 0x30]
cmp eax, 0x80000000
je 0x42321a
test eax, eax
je 0x42321a
push dword [esp + 0x34]
push 0
push dword [0x4c0b18]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x78]
cmp eax, 0x80000000
je 0x422feb
test eax, eax
je 0x422feb
push dword [esp + 0x7c]
jmp 0x422fdd
mov esi, dword [esp + 0x2fc]
lea ecx, [esp + 0x7ac]
call fcn.0041294c
cmp esi, 2
jne 0x42325e
lea ecx, [esp + 0x2fc]
call fcn.00412f18
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea ecx, [esp + 0x7ac]
call fcn.0041294c
jmp 0x42325e
mov ecx, str.a_Display_implementation_returned_an_error_unexpectedly
mov edx, 0x37
push 0x4ad224
push 0x4a588c
lea eax, [esp + 0x28]
push eax
call fcn.0048d6c0