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

Disassembly:
sub esp, 0x38
mov al, byte [0x4bd5ac]
mov ecx, dword [0x4bd598]
mov edx, dword [esp + 0x54]
mov byte [esp + 3], al
mov eax, dword [0x4bd5d0]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x54]
mov esi, 0x14bc
xor eax, edi
mov ebp, dword [0x4bd56c]
mov dword [esp + 0x44], eax
inc ecx
mov eax, dword [0x4bd5c4]
mov dword [0x4bd598], ecx
mov dword [esp + 0x14], edi
movzx ebx, word [eax + ecx*2]
mov ecx, dword [esp + 0x60]
mov dword [esp + 0x3c], ebx
lea eax, [ecx - 1]
movzx eax, ax
mov dword [esp + 0x28], eax
mov eax, dword [edx + edi*4]
cdq
idiv esi
mov eax, dword [0x4bd5e0]
mov esi, dword [esp + 0x50]
or eax, 0x14ef
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x30], edx
movzx edx, cx
mov ecx, dword [esp + 0x64]
movzx eax, word [esi + eax*2]
mov dword [esp + 0x18], eax
mov eax, dword [0x4bd564]
dec eax
mov dword [esp + 0x2c], edx
mov dword [0x4bd564], eax
mov edx, dword [ecx + edx*4]
and edx, eax
inc ebp
lea eax, [edi + 1]
mov dword [0x4bd56c], ebp
mov edi, eax
mov dword [esp + 0x34], edx
mov dx, word [0x4bd57c]
xor ebp, edi
dec dword [0x4bd570]
mov dword [esp + 0x40], eax
mov eax, dword [ecx + edi*4]
inc edi
inc dx
mov dword [esp + 0x20], ebp
mov word [0x4bd57c], dx
add dl, 0x2b
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], edi
cmp ebp, 0xb1a
jl 0x405506
movzx ecx, word [esi + 0x18c4]
movzx eax, word [0x4bd5b4]
mov edx, dword [ebx]
imul ecx, eax
sub ecx, dword [ebx + edx*4]
mov dword [ebx + edx*4], ecx
mov eax, dword [0x4bd5b8]
mov ecx, dword [0x4bd5dc]
mov edx, dword [esp + 0x18]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x4bd59c]
add ecx, dword [edx + eax*4]
mov edx, dword [esp + 0x28]
imul ebp, ecx
mov ecx, dword [0x4bd5e0]
imul ecx, dword [esp + 0x4c]
movzx eax, word [edx + edi*2]
mov dword [esp + 0x20], ebp
movzx ebp, byte [esp + 0x13]
xor cx, word [esi + ebp*4]
movzx ecx, cx
imul ecx, eax
mov word [edx + edi*2], cx
mov eax, dword [ebx]
mov ecx, dword [0x4bd5dc]
movzx ebx, word [esi + eax*2]
movzx esi, word [edx + 0x31ca]
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x5c]
mov edi, dword [eax + ebp*4]
movzx eax, byte [edx + 0x1ed7]
add edi, 0x1edb
sub esi, eax
mov eax, dword [esp + 0x28]
movzx eax, word [eax + 0x349e]
cdq
idiv dword [0x4bd5e0]
mov edx, dword [esp + 0x50]
movzx edx, word [edx + ecx*2]
mov ecx, dword [0x4bd598]
or edx, 0x18cf
xor ecx, dword [esp + 0x14]
push ecx
push edx
push eax
push esi
push edi
push ebx
call fcn.00404855
mov ecx, dword [0x4bd584]
mov edx, dword [esp + 0x68]
mov edi, dword [esp + 0x44]
mov ebx, dword [esp + 0x54]
mov word [edx + ecx*2], ax
dec dword [0x4bd584]
mov eax, dword [0x4bd56c]
mov ecx, dword [esp + 0x3c]
dec eax
mov edx, dword [esp + 0x6c]
mov dword [0x4bd56c], eax
mov ecx, dword [ecx + ebp*4]
or ecx, eax
mov eax, dword [0x4bd5ec]
mov dword [edx + eax*4], ecx
inc dword [0x4bd5ec]
mov ecx, dword [0x4bd5d0]
mov esi, dword [edx + edi*4]
dec ecx
mov eax, dword [0x4bd58c]
mov edx, 0x656
mov dword [0x4bd5d0], ecx
sub edx, dword [eax + ecx*4]
mov eax, dword [ebx + ebp*4]
add eax, dword [0x4bd564]
push eax
push edx
push 0x37
push esi
push 0xf75
push dword [esp + 0x78]
call fcn.00404855
mov ecx, dword [esp + 0x44]
add esp, 0x30
mov dword [ecx*4 + 0xd15], eax
mov eax, dword [esp + 0x1c]
xor eax, 0x18cf
movzx esi, word [0x4bd5c8]
cdq
idiv dword [esp + 0x20]
mov ecx, dword [0x4bd574]
imul edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x1c], eax
or dword [ecx + esi*4], edx
inc word [0x4bd5c8]
mov eax, dword [0x4bd584]
mov esi, dword [esp + 0x30]
dec eax
mov dword [0x4bd584], eax
mov esi, dword [esi + eax*4]
cmp esi, edi
mov edi, dword [esp + 0x60]
jge 0x405500
mov eax, dword [esp + 0x34]
mov ecx, ebx
sub ecx, eax
mov dword [esp + 0x40], ecx
lea ebp, [eax + esi*4]
movzx ecx, word [0x4bd5a0]
inc edi
mov eax, dword [esp + 0x4c]
cdq
idiv ecx
mov eax, dword [0x4bd568]
and eax, 0x37
mov ecx, dword [esp + 0x38]
push edx
push eax
mov eax, dword [esp + 0x20]
inc dword [esp + 0x1c]
push dword [eax + 0x6584]
mov eax, dword [esp + 0x4c]
push dword [eax + ebp]
mov eax, dword [esp + 0x60]
movzx eax, word [eax + esi*2]
imul eax, eax, 0x37
push eax
mov eax, dword [ebx]
movzx eax, byte [eax + ecx]
sub eax, esi
push eax
call fcn.00404855
mov eax, dword [ebp]
xor edx, edx
div dword [0x4bd564]
add esp, 0x18
lea ebp, [ebp + 4]
mov dword [0x4bd564], eax
inc esi
movzx eax, di
cmp esi, eax
jl 0x405496
inc edi
jmp 0x40558b
mov ecx, dword [ebx]
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x2c]
mov eax, dword [eax + ecx*4]
cmp eax, dword [ebx + edi*4]
jne 0x40552c
mov eax, dword [0x4bd5a8]
mov ebp, 0x13cd
cmp word [eax + edi*2], bp
mov ebp, dword [esp + 0x20]
jb 0x405587
dec ecx
mov edi, 0x289
mov dword [ebx], ecx
inc dl
movzx eax, dl
xor edx, edx
xor eax, dword [0x4bd584]
div edi
mov bl, byte [esp + 0x13]
mov eax, ebp
sub dx, word [esi + ecx*2]
and eax, 0x1aef
mov word [esi + ecx*2], dx
mov word [0x4bd568], ax
mov eax, dword [0x4bd588]
movzx ecx, bl
mov esi, dword [0x4bd584]
mov edi, dword [esp + 0x60]
mov eax, dword [eax + ecx*4]
cdq
idiv ebp
mov edx, dword [esp + 0x5c]
movzx eax, al
movzx ecx, byte [esi + edx]
imul eax, ecx
mov byte [esi + edx], al
jmp 0x40558f
mov edi, dword [esp + 0x60]
mov bl, byte [esp + 0x13]
mov eax, dword [0x4bd5a8]
mov ebp, dword [esp + 0x64]
movzx ecx, bl
movzx ecx, word [eax + ecx*4]
mov eax, dword [0x4bd584]
mov eax, dword [ebp + eax*4]
or eax, dword [esp + 0x4c]
cdq
idiv ecx
mov ecx, dword [0x4bd5dc]
xor edx, edx
xor bl, al
mov eax, dword [0x4bd59c]
movzx esi, bl
div dword [ebp + ecx*4]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x14]
mov ebp, dword [esp + 0x44]
or dword [eax + esi*4], edx
dec dword [0x4bd5dc]
mov eax, dword [esp + 0x34]
mov ebp, dword [ebp + ecx*4]
and ebp, dword [eax + 0x46ec]
mov eax, dword [0x4bd5e8]
xor ebp, ecx
mov ecx, dword [0x4bd584]
inc ebp
mov dword [esp + 0x34], ebp
mov eax, dword [eax + ecx*4]
mov dword [esp + 0x60], eax
cmp eax, 0x1a67
je 0x405723
mov ebp, dword [esp + 0x1c]
movzx ecx, di
mov dword [esp + 0x40], ecx
mov ecx, dword [esp + 0x18]
lea eax, [ecx + eax*4]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x54]
sub eax, ecx
mov dword [esp + 0x44], eax
mov ecx, dword [0x4bd5bc]
inc bl
mov eax, dword [0x4bd574]
mov byte [esp + 0x13], bl
movzx ebx, bl
movzx edi, word [0x4bd5ac]
mov eax, dword [eax + ecx*4]
mov ecx, dword [0x4bd594]
imul eax, dword [ebx*4 + 0xd15]
mov esi, dword [0x4bd588]
sub eax, 0x1957
cdq
idiv dword [ecx + 0x3a7c]
mov ecx, dword [esp + 0x60]
add dword [0x4bd5a4], eax
mov eax, dword [0x4bd58c]
mov edx, dword [esp + 0x64]
mov eax, dword [eax + ecx*4]
xor eax, ebp
sub eax, dword [edx + ebx*4]
mov edx, dword [esp + 0x50]
movzx ecx, word [edx + ecx*2]
cdq
idiv ecx
mov eax, dword [esp + 0x38]
xor dword [esi + edi*4], edx
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x64]
movzx ecx, byte [ebx + eax]
mov ebx, dword [esp + 0x60]
mov eax, ebx
sub eax, ecx
add dword [esp + 0x18], 4
mov ecx, dword [esp + 0x44]
and eax, dword [ecx + edi]
mov ecx, dword [0x4bd5b0]
cdq
idiv dword [esi + ecx*4]
mov eax, 0x9e0
mov ecx, dword [esp + 0x54]
or dword [edi], edx
sub eax, ebx
mov dword [0x4bd570], eax
mov eax, dword [0x4bd5e4]
cdq
idiv dword [esp + 0x40]
mov edi, dword [esp + 0x4c]
mov dword [esi + edi*4], edx
mov eax, dword [0x4bd564]
mov eax, dword [ecx + eax*4 + 0x10]
mov ecx, 0x761
xor eax, dword [0x4bd5e0]
cdq
idiv ecx
imul edx, dword [0x4bd560]
inc ebx
mov dword [esp + 0x60], ebx
cmp ebx, 0x1a67
mov bl, byte [esp + 0x13]
mov dword [0x4bd560], edx
jne 0x40562c
mov ebp, dword [esp + 0x34]
jmp 0x405727
mov edi, dword [esp + 0x4c]
mov eax, ebp
mov dword [esp + 0x4c], eax
cmp ebp, 0xf68
jne 0x4057af
mov esi, dword [esp + 0x3c]
mov ebx, dword [esp + 0x1c]
add eax, 0x37
mov ecx, 0xb88
push eax
mov eax, ebx
cdq
idiv ecx
push dword [esp + 0x5c]
push edx
call fcn.00414bc0
mov ecx, dword [0x4bd56c]
inc ebp
mov edx, dword [esp + 0x68]
inc ecx
mov word [0x4bd568], ax
mov dword [0x4bd56c], ecx
mov al, byte [edx + ebp]
add byte [edx + ecx*2], al
dec ebx
dec dword [esi]
mov eax, dword [esi]
mov ecx, dword [esp + 0x30]
movzx eax, word [ecx + eax*4]
push eax
mov al, byte [esp + 0x68]
or al, byte [esp + 0x5c]
movzx eax, al
push ebx
push eax
call fcn.00414bc0
mov ecx, dword [0x4bd5b8]
add esp, 0x18
mov dword [ecx + edi*4], eax
mov eax, dword [esp + 0x4c]
inc eax
mov dword [esp + 0x4c], eax
cmp eax, 0xf68
je 0x40573d
mov eax, dword [esp + 0x50]
pop edi
pop esi
movzx ecx, word [eax + ebp*2]
mov eax, dword [esp + 0x18]
cdq
pop ebp
idiv ecx
pop ebx
add esp, 0x38
ret