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

Disassembly:
mov ecx, dword [0x4595e0]
sub esp, 0x60
mov eax, dword [ecx + 0x2ac]
push ebx
push ebp
push esi
test al, 2
push edi
je 0x402eb9
and al, 0xfd
push 0
mov dword [ecx + 0x2ac], eax
mov eax, dword [0x4595e0]
or ecx, 0xffffffff
mov edi, dword [eax + 0x2b0]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, 0x459e40
lea eax, [ebp + 0x3c]
push eax
mov dword [esp + 0x28], eax
call fcn.0043aee0
mov edx, eax
test edx, edx
mov dword [esp + 0x18], edx
jne 0x402a10
mov ecx, dword [0x4595e0]
pop edi
pop esi
pop ebp
mov dword [ecx + 0x140], 1
pop ebx
add esp, 0x60
ret
mov edi, str.EMESYS_VER1.20
or ecx, 0xffffffff
xor eax, eax
push ebp
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [edx + 4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, dword [edx + 4]
mov ecx, 0xa
add ebx, 0x10
mov edi, ebx
rep stosd dword es:[edi], eax
mov byte [ebx], 2
mov dword [ebx + 8], 0xdc38eb76
mov ecx, dword [edx + 4]
mov dword [ecx + 0x38], ebp
mov eax, dword [0x4595e0]
mov edx, dword [edx + 4]
or ecx, 0xffffffff
mov edi, dword [eax + 0x2b0]
xor eax, eax
add edx, 0x3c
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, edx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0040f960
add esp, 0xc
mov eax, ebx
mov ecx, 0xdc38eb76
mov edx, 0xb
mov ebp, dword [eax]
add eax, 4
xor ebp, ecx
dec edx
mov dword [eax - 4], ebp
mov ecx, ebp
jne 0x402a99
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push str.emecfg.ecf
mov dword [esp + 0x2c], 0
call dword [0x452164]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x402eb9
xor esi, esi
lea ecx, [esp + 0x10]
push esi
push ecx
push esi
push ebp
mov dword [esp + 0x20], esi
call dword [0x452168]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x10], esi
push esi
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x14]
mov ecx, dword [esi + 4]
push edx
push eax
push ecx
push ebp
call dword [0x45216c]
test eax, eax
jne 0x402b2a
push ebp
call dword [0x45217c]
push esi
mov ecx, 0x459e40
call fcn.0043ae90
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
mov edx, 0xdc38eb76
mov eax, ebx
mov edi, 0xb
mov ecx, dword [eax]
add eax, 4
mov esi, ecx
xor esi, edx
dec edi
mov dword [eax - 4], esi
mov edx, ecx
jne 0x402b36
mov edx, dword [0x459814]
xor edi, edi
lea ecx, [esp + 0x10]
push edi
mov eax, dword [edx + 0x490]
push ecx
lea edx, [esp + 0x1c]
push 4
push edx
push ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], edi
call dword [0x45216c]
test eax, eax
je 0x402ea3
mov ecx, dword [0x459814]
mov dword [esp + 0x1c], edi
mov eax, dword [ecx + 0x490]
cmp eax, edi
mov dword [esp + 0x20], eax
jbe 0x402cda
jmp 0x402b9b
mov edi, dword [esp + 0x1c]
mov edx, dword [0x459814]
push edi
lea ecx, [edx + 0x48c]
call fcn.0043b540
mov esi, eax
test esi, esi
je 0x402ea3
mov eax, dword [0x459814]
push edi
lea ecx, [eax + 0x48c]
call fcn.0043b540
mov edx, eax
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
mov edi, esi
mov dword [esp + 0x24], eax
or ecx, 0xffffffff
xor eax, eax
push 0x44
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x2c], edx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x28]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [edx + 0x44]
lea ecx, [esp + 0x30]
push ecx
push ebx
mov dword [esp + 0x78], eax
mov dword [esp + 0x20], eax
call fcn.0040f960
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x2c]
mov dword [esp + 0x10], 0
push 0
push edx
push 0x44
push eax
push ebp
call dword [0x45216c]
test eax, eax
je 0x402ec8
mov ecx, dword [esp + 0x14]
push 0
push ecx
mov ecx, 0x459e40
call fcn.0043aee0
test eax, eax
mov dword [esp + 0x24], eax
je 0x402e93
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x14]
mov edi, dword [eax + 4]
mov esi, dword [edx + 0x40]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov edx, dword [eax + 4]
push ecx
push edx
push ebx
call fcn.0040f960
mov esi, dword [esp + 0x30]
mov ecx, dword [esp + 0x20]
add esp, 0xc
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
mov edx, dword [esi + 4]
push 0
push eax
push ecx
push edx
push ebp
call dword [0x45216c]
test eax, eax
push esi
mov ecx, 0x459e40
je 0x402ec3
call fcn.0043ae90
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jb 0x402b97
mov edx, dword [0x459814]
xor edi, edi
lea ecx, [esp + 0x10]
push edi
mov eax, dword [edx + 0x498]
push ecx
lea edx, [esp + 0x1c]
push 4
push edx
push ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], edi
call dword [0x45216c]
test eax, eax
je 0x402ea3
mov ecx, dword [0x459814]
mov dword [esp + 0x1c], edi
mov eax, dword [ecx + 0x498]
test eax, eax
mov dword [esp + 0x20], eax
jbe 0x402e70
jmp 0x402d2e
mov edi, dword [esp + 0x1c]
mov edx, dword [0x459814]
push edi
lea ecx, [edx + 0x494]
call fcn.0043b540
mov esi, eax
test esi, esi
je 0x402ea3
mov eax, dword [0x459814]
push edi
lea ecx, [eax + 0x494]
call fcn.0043b540
mov edx, dword [eax + 0x40]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x2c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
mov edi, esi
mov dword [esp + 0x28], eax
or ecx, 0xffffffff
xor eax, eax
push 0x44
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x28], edx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x30]
push ecx
push ebx
call fcn.0040f960
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x2c]
mov dword [esp + 0x10], 0
push 0
push edx
push 0x44
push eax
push ebp
call dword [0x45216c]
test eax, eax
je 0x402ec8
mov ecx, dword [esp + 0x14]
push 0
push ecx
mov ecx, 0x459e40
call fcn.0043aee0
test eax, eax
mov dword [esp + 0x28], eax
je 0x402e93
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x24]
mov edi, dword [eax + 4]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov edx, dword [eax + 4]
push ecx
push edx
push ebx
call fcn.0040f960
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x20]
add esp, 0xc
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
mov edx, dword [esi + 4]
push 0
push eax
push ecx
push edx
push ebp
call dword [0x45216c]
test eax, eax
push esi
mov ecx, 0x459e40
je 0x402ec3
call fcn.0043ae90
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jb 0x402d2a
push ebp
call dword [0x45217c]
mov edx, dword [esp + 0x18]
mov ecx, 0x459e40
push edx
call fcn.0043ae90
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x60
ret
mov edx, dword [0x4595e0]
mov dword [edx + 0x140], 1
push ebp
call dword [0x45217c]
mov eax, dword [esp + 0x18]
mov ecx, 0x459e40
push eax
call fcn.0043ae90
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
call fcn.0043ae90
push ebp
call dword [0x45217c]
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, 0x459e40
call fcn.0043ae90
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret