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

Disassembly:
mov ecx, dword [0x45a610]
sub esp, 0x60
mov eax, dword [ecx + 0x398]
push ebx
push ebp
push esi
test al, 2
push edi
je 0x402f89
and al, 0xfd
push 0
mov dword [ecx + 0x398], eax
mov eax, dword [0x45a610]
or ecx, 0xffffffff
mov edi, dword [eax + 0x39c]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, 0x45af98
lea eax, [ebp + 0x3c]
push eax
mov dword [esp + 0x28], eax
call fcn.0043b7a0
mov edx, eax
test edx, edx
mov dword [esp + 0x18], edx
jne 0x402ae0
mov ecx, dword [0x45a610]
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 [0x45a610]
mov edx, dword [edx + 4]
or ecx, 0xffffffff
mov edi, dword [eax + 0x39c]
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.0040fa70
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 0x402b69
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push str.emecfg.ecf
mov dword [esp + 0x2c], 0
call dword [0x453178]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x402f89
xor esi, esi
lea ecx, [esp + 0x10]
push esi
push ecx
push esi
push ebp
mov dword [esp + 0x20], esi
call dword [0x45317c]
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 [0x453180]
test eax, eax
jne 0x402bfa
push ebp
call dword [0x45318c]
push esi
mov ecx, 0x45af98
call fcn.0043b750
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 0x402c06
mov edx, dword [0x45a844]
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 [0x453180]
test eax, eax
je 0x402f73
mov ecx, dword [0x45a844]
mov dword [esp + 0x1c], edi
mov eax, dword [ecx + 0x490]
cmp eax, edi
mov dword [esp + 0x20], eax
jbe 0x402daa
jmp 0x402c6b
mov edi, dword [esp + 0x1c]
mov edx, dword [0x45a844]
push edi
lea ecx, [edx + 0x48c]
call fcn.0043bdf0
mov esi, eax
test esi, esi
je 0x402f73
mov eax, dword [0x45a844]
push edi
lea ecx, [eax + 0x48c]
call fcn.0043bdf0
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.0040fa70
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 [0x453180]
test eax, eax
je 0x402f98
mov ecx, dword [esp + 0x14]
push 0
push ecx
mov ecx, 0x45af98
call fcn.0043b7a0
test eax, eax
mov dword [esp + 0x24], eax
je 0x402f63
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.0040fa70
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 [0x453180]
test eax, eax
push esi
mov ecx, 0x45af98
je 0x402f93
call fcn.0043b750
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jb 0x402c67
mov edx, dword [0x45a844]
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 [0x453180]
test eax, eax
je 0x402f73
mov ecx, dword [0x45a844]
mov dword [esp + 0x1c], edi
mov eax, dword [ecx + 0x498]
test eax, eax
mov dword [esp + 0x20], eax
jbe 0x402f40
jmp 0x402dfe
mov edi, dword [esp + 0x1c]
mov edx, dword [0x45a844]
push edi
lea ecx, [edx + 0x494]
call fcn.0043bdf0
mov esi, eax
test esi, esi
je 0x402f73
mov eax, dword [0x45a844]
push edi
lea ecx, [eax + 0x494]
call fcn.0043bdf0
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.0040fa70
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 [0x453180]
test eax, eax
je 0x402f98
mov ecx, dword [esp + 0x14]
push 0
push ecx
mov ecx, 0x45af98
call fcn.0043b7a0
test eax, eax
mov dword [esp + 0x28], eax
je 0x402f63
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.0040fa70
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 [0x453180]
test eax, eax
push esi
mov ecx, 0x45af98
je 0x402f93
call fcn.0043b750
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
jb 0x402dfa
push ebp
call dword [0x45318c]
mov edx, dword [esp + 0x18]
mov ecx, 0x45af98
push edx
call fcn.0043b750
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x60
ret
mov edx, dword [0x45a610]
mov dword [edx + 0x140], 1
push ebp
call dword [0x45318c]
mov eax, dword [esp + 0x18]
mov ecx, 0x45af98
push eax
call fcn.0043b750
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret
call fcn.0043b750
push ebp
call dword [0x45318c]
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, 0x45af98
call fcn.0043b750
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x60
ret