Function at 0x4013540
Capabilities:
Encode data using xor
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x64
push ebx
push esi
push edi
mov edi, dword [esp + 0x7c]
test edi, edi
je 0x401464b
mov ebx, dword [esp + 0x78]
mov esi, dword [esp + 0x74]
mov edx, ebx
mov ecx, esi
call fcn.040104a0
test eax, eax
mov dword [esp + 0x18], eax
je 0x401464b
push ebp
mov ebp, dword [esp + 0x84]
test ebp, ebp
jge 0x401358e
mov ecx, edi
call fcn.04013470
mov ebp, eax
add ebp, 1
mov dword [esp + 0x84], ebp
test ebx, 0x300
je 0x401369c
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x4013690
cmp eax, ebp
jl 0x40145e8
test ebx, 0x100
je 0x4013601
test ebx, 0x1000000
mov edi, 0x409c7c8
je 0x4013640
mov edx, dword [0x409cd40]
xor ecx, ecx
test edx, edx
mov edi, 0x409c9d8
je 0x4013640
xor eax, eax
lea esp, [esp]
cmp edx, esi
jne 0x40135ea
mov edi, dword [eax + 0x409cd48]
add ecx, 1
lea eax, [ecx + ecx*2]
add eax, eax
mov edx, dword [eax + eax + 0x409cd40]
add eax, eax
test edx, edx
jne 0x40135e0
jmp 0x4013640
test ebx, 0x1000000
mov edi, 0x409c6c0
je 0x4013640
mov edx, dword [0x409cd40]
xor ecx, ecx
test edx, edx
mov edi, 0x409c8d0
je 0x4013640
xor eax, eax
cmp edx, esi
jne 0x401362b
mov edi, dword [eax + 0x409cd44]
add ecx, 1
lea eax, [ecx + ecx*2]
add eax, eax
mov edx, dword [eax + eax + 0x409cd40]
add eax, eax
test edx, edx
jne 0x4013621
test ebp, ebp
jle 0x4013690
mov edx, dword [esp + 0x88]
mov esi, ebp
lea ecx, [ecx]
mov eax, dword [esp + 0x80]
movzx ecx, word [eax]
add eax, 2
mov dword [esp + 0x80], eax
movzx eax, cx
mov ebx, eax
shr ebx, 8
movzx ebx, byte [ebx + edi]
and eax, 0xff
shl ebx, 8
add ebx, eax
mov ax, word [ebx*2 + 0x40986b8]
add ax, cx
mov word [edx], ax
add edx, 2
sub esi, 1
jne 0x4013650
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x64
ret 0x18
test ebx, 0x400
je 0x40145e8
test ebx, 0x7efcebf8
jne 0x40145e8
lea ecx, [ebp + ebp*8]
add ecx, ecx
add ecx, ecx
call fcn.040106c0
test eax, eax
mov dword [esp + 0x58], eax
je 0x40145e8
add eax, 0xc
test bl, 1
lea edx, [ebp + ebp*2]
lea esi, [eax + edx*2]
lea edi, [esi + edx]
mov dword [esp + 0x2c], eax
mov ecx, eax
lea eax, [edi + edx]
mov dword [esp + 0x38], eax
mov dword [esp + 0x20], eax
lea eax, [eax + edx*4]
mov dword [esp + 0x34], edx
mov dword [esp + 0x30], esi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], eax
mov dword [esp + 0x3c], eax
mov byte [esp + 0x78], 0xff
je 0x4013711
mov byte [esp + 0x78], 0xe7
test ebx, 0x10000
je 0x401371e
and byte [esp + 0x78], 0xdf
test ebx, 0x20000
je 0x401372b
and byte [esp + 0x78], 0xfe
mov edx, dword [esp + 0x80]
mov eax, ebx
and eax, 0x1000
and ebx, 4
cmp ebp, 1
mov dword [esp + 0x60], eax
mov dword [esp + 0x48], ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 1
jl 0x4013dfa
lea esp, [esp]
mov eax, dword [esp + 0x18]
movzx ebp, word [eax]
mov edx, dword [esp + 0x1c]
mov eax, dword [edx + 8]
movzx ebx, bp
mov ebx, dword [eax + ebx*4]
mov ax, bx
shr ax, 8
cmp al, 0xb
mov dword [esp + 0x5c], ebx
mov word [esp + 0x12], ax
jbe 0x4013b14
cmp dword [edx + 0x10], 0
jne 0x40137fc
mov ebp, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea ebx, [ebx]
mov byte [ecx], al
mov byte [ecx + 1], bl
add ecx, 1
mov eax, ebx
shr ebx, 0x18
and bl, byte [esp + 0x78]
shr eax, 0x10
and bl, 0x3f
mov byte [esi], al
add ebp, 1
mov byte [edi], bl
add edx, 2
add ecx, 1
add esi, 1
add edi, 1
cmp ebp, dword [esp + 0x84]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ebp
jg 0x4013dfa
movzx eax, word [edx]
mov ebx, dword [esp + 0x1c]
mov ebx, dword [ebx + 8]
mov ebx, dword [ebx + eax*4]
mov ax, bx
shr ax, 8
cmp al, 0xb
ja 0x40137a0
jmp 0x4013de9
mov edx, ebx
shr edx, 0x18
test dl, 0xc0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], edx
je 0x4013a09
xor eax, eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x84]
sub eax, dword [esp + 0x14]
sub eax, 0
je 0x4013862
sub eax, 1
je 0x4013856
sub eax, 1
je 0x401384a
mov edx, dword [esp + 0x18]
movzx eax, word [edx + 6]
mov dword [esp + 0x4c], eax
mov edx, dword [esp + 0x18]
movzx eax, word [edx + 4]
mov dword [esp + 0x28], eax
mov edx, dword [esp + 0x18]
movzx eax, word [edx + 2]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x14], 0
movzx edx, bp
mov dword [esp + 0x5c], edx
je 0x40139d4
mov edx, dword [esp + 0x14]
add edx, 1
cmp edx, dword [esp + 0x84]
jg 0x40139d4
mov eax, dword [esp + 0x18]
movzx edx, word [eax + 2]
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 8]
mov edx, dword [eax + edx*4]
xor edx, ebx
test edx, 0xe7ffffff
jne 0x40139d4
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 0x18]
movzx eax, word [edx + 4]
test eax, eax
je 0x40139d4
mov ebp, dword [esp + 0x24]
cmp word [edx + 6], bp
jbe 0x40138d5
add edx, 0x10
sub eax, 1
jne 0x40138c2
jmp 0x40139d4
test eax, eax
je 0x40139d4
cmp word [edx + 6], bp
jne 0x40139d4
mov eax, dword [esp + 0x28]
cmp ax, word [edx + 0xc]
jb 0x40139d4
cmp ax, word [edx + 0xe]
ja 0x40139d4
movzx eax, word [edx + 8]
movzx edx, word [edx + 0xa]
test edx, edx
mov ebp, dword [esp + 0x1c]
mov ebp, dword [ebp + 0x1c]
lea eax, [ebp + eax*8]
je 0x40139d4
mov ebp, dword [esp + 0x28]
mov edi, edi
cmp word [eax], bp
jbe 0x4013932
add eax, 8
sub edx, 1
jne 0x4013920
jmp 0x40139d4
test edx, edx
je 0x40139d4
jmp 0x4013944
mov ebp, dword [esp + 0x28]
cmp word [eax], bp
jne 0x40139d4
movzx ebp, word [eax + 2]
test bp, bp
je 0x4013967
cmp bp, word [esp + 0x4c]
je 0x4013973
add eax, 8
sub edx, 1
jne 0x4013940
jmp 0x40139d4
add dword [esp + 0x18], 6
add dword [esp + 0x14], 3
jmp 0x401397d
add dword [esp + 0x18], 8
add dword [esp + 0x14], 4
mov ebx, dword [eax + 4]
mov ax, bx
shr ax, 8
mov byte [ecx], al
mov byte [ecx + 1], bl
add ecx, 1
mov byte [ecx + 1], al
add ecx, 1
mov word [esp + 0x12], ax
add ecx, 1
mov byte [ecx], bl
mov eax, ebx
shr eax, 0x10
mov byte [esi], al
mov byte [esi + 1], al
add esi, 1
mov eax, ebx
shr eax, 0x18
mov dword [esp + 0x44], eax
and al, byte [esp + 0x78]
add edi, 1
and al, 0x3f
mov byte [edi - 1], al
add ecx, 1
add esi, 1
mov byte [edi], al
mov dword [esp + 0x40], 1
add edi, 1
mov edx, dword [esp + 0x1c]
mov edx, dword [edx + 0x18]
movzx eax, word [edx + 4]
test eax, eax
je 0x40139f5
mov ebp, dword [esp + 0x5c]
cmp word [edx + 6], bp
jbe 0x4013a2c
add edx, 0x10
sub eax, 1
jne 0x40139e7
cmp dword [esp + 0x40], 0
jne 0x4013de9
mov edx, dword [esp + 0x44]
mov ax, word [esp + 0x12]
and dl, byte [esp + 0x78]
mov byte [ecx], al
add ecx, 1
mov byte [ecx], bl
shr ebx, 0x10
and dl, 0x3f
mov byte [esi], bl
add ecx, 1
add esi, 1
mov byte [edi], dl
add edi, 1
jmp case.0x4013b2a.3
test eax, eax
je 0x40139f5
cmp word [edx + 6], bp
jne 0x40139f5
mov eax, dword [esp + 0x24]
cmp ax, word [edx + 0xc]
jb 0x40139f5
cmp ax, word [edx + 0xe]
ja 0x40139f5
movzx eax, word [edx + 8]
movzx edx, word [edx + 0xa]
test edx, edx
mov ebp, dword [esp + 0x1c]
mov ebp, dword [ebp + 0x1c]
lea eax, [ebp + eax*8]
je 0x40139f5
mov ebp, dword [esp + 0x24]
cmp word [eax], bp
jbe 0x4013a70
add eax, 8
sub edx, 1
jne 0x4013a61
jmp 0x40139f5
test edx, edx
je 0x40139f5
jmp 0x4013a84
mov ebp, dword [esp + 0x24]
cmp word [eax], bp
jne 0x40139f5
movzx ebp, word [eax + 2]
test bp, bp
je 0x4013aaa
cmp bp, word [esp + 0x28]
je 0x4013adf
add eax, 8
sub edx, 1
jne 0x4013a80
jmp 0x40139f5
mov eax, dword [eax + 4]
add dword [esp + 0x18], 4
add dword [esp + 0x14], 2
mov byte [ecx], ah
mov byte [ecx + 1], al
add ecx, 1
mov edx, eax
shr eax, 0x18
and al, byte [esp + 0x78]
shr edx, 0x10
and al, 0x3f
mov byte [esi], dl
add ecx, 1
add esi, 1
mov byte [edi], al
add edi, 1
jmp 0x4013de9
mov eax, dword [eax + 4]
add dword [esp + 0x18], 6
add dword [esp + 0x14], 3
mov byte [ecx], ah
mov byte [ecx + 1], al
add ecx, 1
mov edx, eax
shr eax, 0x18
and al, byte [esp + 0x78]
shr edx, 0x10
and al, 0x3f
mov byte [esi], dl
add ecx, 1
add esi, 1
mov byte [edi], al
add edi, 1
jmp 0x4013de9
movzx edx, al
add edx, 0xffffffff
cmp edx, 0xa
ja case.0x4013b2a.3
movzx edx, byte [edx + 0x4014670]
jmp dword [edx*4 + 0x4014658]
shr ebx, 0x10
cmp esi, dword [esp + 0x30]
jbe 0x4013b42
add byte [esi - 1], bl
jmp case.0x4013b2a.3
mov byte [esi], bl
add esi, 1
jmp case.0x4013b2a.3
movzx ebp, bl
mov ebx, dword [esp + 0x1c]
mov edx, dword [ebx + 8]
add ebp, ebp
movzx eax, word [ebp + ebp + str.AEUETHssaeuethIJijOEoeD]
add ebp, ebp
lea eax, [edx + eax*4]
movzx edx, byte [eax + 1]
mov byte [ecx], dl
movzx edx, byte [eax]
mov byte [ecx + 1], dl
movzx edx, byte [eax + 2]
add ecx, 1
mov byte [esi], dl
mov al, byte [eax + 3]
mov dl, byte [esp + 0x78]
and al, dl
and al, 0x3f
mov byte [edi], al
movzx eax, word [ebp + 0x4057592]
mov ebx, dword [ebx + 8]
lea eax, [ebx + eax*4]
add ecx, 1
add esi, 1
add edi, 1
cmp byte [eax + 1], 2
jne 0x4013c00
mov ebx, dword [esp + 0x1c]
mov ebx, dword [ebx + 8]
lea ebx, [ebx]
movzx ebp, byte [eax]
add ebp, ebp
movzx eax, word [ebp + ebp + str.AEUETHssaeuethIJijOEoeD]
lea eax, [ebx + eax*4]
movzx ebx, byte [eax + 1]
add ebp, ebp
mov byte [ecx], bl
movzx ebx, byte [eax]
mov byte [ecx + 1], bl
movzx ebx, byte [eax + 2]
add ecx, 1
mov byte [esi], bl
mov al, byte [eax + 3]
and al, dl
and al, 0x3f
mov byte [edi], al
mov eax, dword [esp + 0x1c]
mov ebx, dword [eax + 8]
movzx eax, word [ebp + 0x4057592]
lea eax, [ebx + eax*4]
add ecx, 1
add esi, 1
add edi, 1
cmp byte [eax + 1], 2
je 0x4013bb0
movzx ebx, byte [eax + 1]
mov byte [ecx], bl
movzx ebx, byte [eax]
add ecx, 1
mov byte [ecx], bl
movzx ebx, byte [eax + 2]
mov byte [esi], bl
mov al, byte [eax + 3]
and al, dl
and al, 0x3f
add ecx, 1
add esi, 1
mov byte [edi], al
add edi, 1
jmp case.0x4013b2a.3
cmp dword [esp + 0x60], 0
jne case.0x4013b2a.6
mov ebp, dword [esp + 0x3c]
mov eax, ecx
sub eax, dword [esp + 0x2c]
add ebp, 1
cdq
sub eax, edx
sar eax, 1
lea edx, [eax*4 + 4]
add al, 1
add al, al
mov dl, dh
or dl, 0x80
mov byte [ebp - 1], dl
add al, al
or al, 3
mov byte [ebp], al
mov al, byte [esp + 0x12]
add ebp, 1
mov byte [ebp], al
add ebp, 1
mov byte [ebp], bl
add ebp, 1
mov dword [esp + 0x3c], ebp
jmp case.0x4013b2a.3
cmp dword [esp + 0x48], 0
jne case.0x4013b2a.3
mov byte [ecx], al
mov byte [ecx + 1], bl
add ecx, 1
mov edx, ebx
shr ebx, 0x18
and bl, byte [esp + 0x78]
shr edx, 0x10
and bl, 0x3f
mov byte [esi], dl
add ecx, 1
add esi, 1
mov byte [edi], bl
add edi, 1
jmp case.0x4013b2a.3
mov eax, ebx
shr eax, 0x18
and al, byte [esp + 0x78]
or al, 0xc4
cmp bl, 1
mov byte [esp + 0x12], al
ja 0x4013d94
mov edx, dword [esp + 0x18]
add edx, 0xfffffffe
cmp edx, dword [esp + 0x80]
mov byte [ecx], 0xff
mov byte [ecx + 1], 0xff
jb 0x4013d8c
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax + 8]
jmp 0x4013cf0
movzx eax, word [edx]
mov eax, dword [ebp + eax*4]
cmp ah, 3
jae 0x4013d07
cmp ah, 2
je 0x4013d8c
jmp 0x4013d0d
jne 0x4013d82
cmp al, 1
ja 0x4013d1b
sub edx, 2
cmp edx, dword [esp + 0x80]
jae 0x4013cf0
jmp 0x4013d8c
mov edx, dword [esp + 0x1c]
mov dl, byte [edx + 0x20]
mov ebp, dword [esp + 0x20]
mov byte [ecx + 1], al
shr eax, 0x18
and al, byte [esp + 0x78]
mov byte [ecx], dl
or al, 0xc4
mov dl, al
and dl, 0xc6
mov byte [ebp], dl
mov edx, dword [esp + 0x34]
mov byte [esp + 0x11], al
and al, 0xe4
test bl, bl
mov byte [ebp + edx*2], al
lea ebx, [ebp + edx*2]
jne 0x4013d68
mov al, byte [esp + 0x11]
mov byte [edx + ebp], 4
and al, 0xc5
add ebp, 1
mov byte [edx + ebx], al
mov dword [esp + 0x20], ebp
jmp 0x4013d87
and byte [ecx + 1], 0x87
mov al, byte [esp + 0x12]
mov byte [edx + ebp], 5
and al, 0xc5
add ebp, 1
mov byte [edx + ebx], al
mov dword [esp + 0x20], ebp
jmp 0x4013d87
mov byte [ecx], ah
mov byte [ecx + 1], al
cmp byte [ecx], 0xff
jne 0x4013dcd
cmp byte [ecx + 1], 0xff
jne 0x4013dcd
jmp 0x4013ddc
mov edx, dword [esp + 0x1c]
mov dl, byte [edx + 0x20]
mov ebp, dword [esp + 0x20]
mov byte [ecx], dl
mov byte [ecx + 1], bl
mov dl, al
and dl, 0xc6
mov byte [ebp], dl
mov edx, dword [esp + 0x34]
mov bl, al
and bl, 0xe4
mov byte [edx + ebp], 3
mov byte [ebp + edx*2], bl
and al, 0xc5
lea ebx, [ebp + edx*2]
add ebp, 1
mov byte [edx + ebx], al
mov dword [esp + 0x20], ebp
mov al, byte [esp + 0x5e]
mov byte [esi], al
add esi, 1
mov byte [edi], 2
add edi, 1
add ecx, 2
add dword [esp + 0x18], 2
add dword [esp + 0x14], 1
mov edx, dword [esp + 0x14]
cmp edx, dword [esp + 0x84]
jle 0x4013760
mov eax, dword [esp + 0x8c]
xor ebp, ebp
cmp eax, ebp
jne 0x4014067
mov ebx, dword [esp + 0x7c]
mov eax, ebx
xor edx, edx
and eax, 0x1000000
mov dword [esp + 0x88], ebp
mov dword [esp + 0x64], ebp
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x70], ebp
mov dword [esp + 0x84], ebp
mov dword [esp + 0x8c], eax
je 0x4013e5d
mov eax, dword [esp + 0x2c]
cmp ecx, eax
je 0x4013e63
mov bl, byte [eax]
add eax, 1
test bl, bl
je 0x4013e53
add ebp, 1
cmp eax, ecx
jne 0x4013e47
mov ebx, dword [esp + 0x7c]
jmp 0x4013e63
sub ecx, dword [esp + 0x2c]
mov ebp, ecx
mov ecx, ebx
add ebp, 1
and ecx, 2
jne 0x4013ea7
mov eax, dword [esp + 0x1c]
sub esi, 1
cmp dword [eax + 0xc], 1
mov eax, dword [esp + 0x30]
jne 0x4013e90
cmp eax, esi
ja 0x4013ea0
cmp byte [eax], 2
ja 0x4013ea0
add eax, 1
cmp eax, esi
jbe 0x4013e82
jmp 0x4013ea0
cmp esi, eax
jb 0x4013ea0
cmp byte [esi], 2
ja 0x4013ea0
sub esi, 1
cmp esi, eax
jae 0x4013e94
sub esi, eax
add esi, 1
mov edx, esi
and ebx, 0x20001
cmp ebx, 0x20001
lea ebp, [edx + ebp + 1]
je 0x4013edc
mov eax, dword [esp + 0x50]
sub edi, 1
cmp edi, eax
jb 0x4013ed0
cmp byte [edi], 2
ja 0x4013ed0
sub edi, 1
cmp edi, eax
jae 0x4013ec4
sub edi, eax
add edi, 1
mov dword [esp + 0x88], edi
mov edx, dword [esp + 0x88]
mov edi, dword [esp + 0x38]
lea ebx, [edx + ebp + 1]
mov edx, dword [esp + 0x20]
cmp edi, edx
mov dword [esp + 0x14], ebx
jae 0x4013fb7
test ecx, ecx
je 0x4013f0d
add ebx, 2
mov dword [esp + 0x14], ebx
mov eax, 2
jmp 0x4013f0f
xor eax, eax
sub edx, 1
cmp eax, 4
jge 0x4013fb7
lea ecx, [eax + 0x409ccec]
mov dword [esp + 0x7c], ecx
mov ecx, eax
lea esi, [esp + eax*4 + 0x64]
imul eax, dword [esp + 0x34]
add eax, edx
shl ecx, 4
mov ebp, eax
mov eax, edi
add ecx, 0x409cd0c
sub eax, edx
mov dword [esp + 0x80], eax
jmp 0x4013f50
mov edx, dword [esp + 0x80]
lea edi, [edx + ebp]
cmp ebp, edi
mov eax, ebp
jb 0x4013f71
mov edx, dword [esp + 0x7c]
mov dl, byte [edx]
cmp byte [eax], dl
jne 0x4013f71
sub eax, 1
cmp eax, edi
jae 0x4013f66
cmp dword [esp + 0x8c], 0
je 0x4013f91
mov edx, dword [ecx]
mov ebx, edx
sub ebx, edi
lea eax, [ebx + eax + 1]
mov ebx, dword [esp + 0x14]
lea edi, [edx + 1]
cdq
idiv edi
jmp 0x4013f96
sub eax, edi
add eax, 1
add ebp, dword [esp + 0x34]
add dword [esp + 0x7c], 1
mov dword [esi], eax
add ecx, 0x10
lea ebx, [ebx + eax + 1]
add esi, 4
cmp ecx, 0x409cd4c
mov dword [esp + 0x14], ebx
jl 0x4013f50
add ebx, 1
cmp dword [esp + 0x48], 0
jne 0x4013fcb
mov eax, dword [esp + 0x3c]
sub eax, dword [esp + 0x54]
jmp 0x4013fd2
mov eax, dword [esp + 0x84]
cmp dword [esp + 0x8c], 0
lea ebp, [ebx + eax + 1]
je 0x4014636
test eax, eax
jne 0x4014636
mov eax, dword [esp + 0x64]
sub ebp, 1
test eax, eax
jne 0x4014009
cmp dword [esp + 0x68], eax
jne 0x4014009
cmp dword [esp + 0x6c], eax
jne 0x4014009
cmp dword [esp + 0x70], eax
je 0x401403e
sub ebp, 1
cmp dword [esp + 0x70], 0
jne 0x4014636
sub ebp, 1
cmp dword [esp + 0x6c], 0
jne 0x4014636
sub ebp, 1
cmp dword [esp + 0x68], 0
jne 0x4014636
sub ebp, 1
test eax, eax
jne 0x4014636
sub ebp, 1
cmp dword [esp + 0x88], 0
jne 0x4014636
mov ecx, dword [esp + 0x58]
sub ebp, 1
call fcn.04010770
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x64
ret 0x18
test dword [esp + 0x7c], 0x80000000
mov edx, dword [esp + 0x2c]
je 0x40140d6
sub ecx, edx
xor eax, eax
cmp ecx, 4
jb 0x401409d
mov esi, ecx
shr esi, 2
mov edi, esi
neg edi
lea ecx, [ecx + edi*4]
lea ebx, [ebx]
rol eax, 3
xor eax, dword [edx]
add edx, 4
sub esi, 1
jne 0x4014090
cmp ecx, ebp
jle 0x40140b3
movzx esi, byte [edx]
rol eax, 3
sub ecx, 1
xor eax, esi
add edx, 1
cmp ecx, ebp
jg 0x40140a1
mov ecx, dword [esp + 0x88]
mov dword [ecx], eax
mov ecx, dword [esp + 0x58]
mov ebp, 4
call fcn.04010770
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x64
ret 0x18
sub ecx, edx
mov dword [esp + 0x84], ebp
mov dword [esp + 0x28], ebp
mov ebx, ecx
je 0x4014137
test dword [esp + 0x7c], 0x1000000
je 0x401411b
mov al, byte [edx]
test al, al
je 0x4014111
cmp ebp, dword [esp + 0x8c]
jg 0x40145df
mov ecx, dword [esp + 0x88]
mov byte [ecx + ebp], al
add ebp, 1
add edx, 1
sub ebx, 1
jne 0x40140f1
jmp 0x4014137
cmp eax, ebx
jl 0x40145df
push ebx
push edx
mov edx, dword [esp + 0x90]
push edx
call sub.msvcr80.dll_memcpy
add esp, 0xc
mov ebp, ebx
mov eax, dword [esp + 0x8c]
add eax, 0xffffffff
cmp ebp, eax
jge 0x40145df
mov ecx, dword [esp + 0x88]
mov eax, dword [esp + 0x7c]
mov byte [ecx + ebp], 1
add ebp, 1
and eax, 2
mov dword [esp + 0x80], eax
jne 0x4014210
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
sub esi, 1
cmp dword [edx + 0xc], 0
je 0x40141c9
cmp eax, esi
ja 0x4014210
cmp byte [eax], 2
ja 0x4014195
add eax, 1
cmp eax, esi
jbe 0x4014184
jmp 0x4014210
cmp esi, eax
jb 0x4014210
mov edx, dword [esp + 0x8c]
mov ecx, esi
sub ecx, eax
add ecx, 2
sub edx, ebp
cmp edx, ecx
jl 0x40145df
mov ecx, dword [esp + 0x88]
mov dl, byte [esi]
mov byte [ecx + ebp], dl
sub esi, 1
add ebp, 1
cmp esi, eax
jae 0x40141b8
jmp 0x4014210
mov ebx, esi
sub ebx, eax
add ebx, 1
je 0x4014210
cmp byte [esi], 2
ja 0x40141e1
sub esi, 1
sub ebx, 1
jne 0x40141d2
jmp 0x4014210
test ebx, ebx
je 0x4014210
mov ecx, dword [esp + 0x8c]
sub ecx, ebp
lea edx, [ebx + 1]
cmp ecx, edx
jl 0x40145df
push ebx
push eax
mov eax, dword [esp + 0x90]
lea ecx, [eax + ebp]
push ecx
call sub.msvcr80.dll_memcpy
add esp, 0xc
add ebp, ebx
mov ecx, dword [esp + 0x8c]
cmp ebp, ecx
jge 0x401423a
mov edx, dword [esp + 0x88]
mov byte [edx + ebp], 1
add ebp, 1
cmp ebp, ecx
jge 0x4014248
mov dword [esp + 0x84], 1
jmp 0x4014248
test dword [esp + 0x7c], 0x1000000
je 0x40145df
mov eax, dword [esp + 0x7c]
and eax, 0x20001
cmp eax, 0x20001
je 0x40142a5
mov eax, dword [esp + 0x50]
mov esi, edi
sub esi, eax
sub edi, 1
test esi, esi
je 0x40142a5
cmp byte [edi], 2
ja 0x4014276
sub edi, 1
sub esi, 1
jne 0x4014267
jmp 0x40142a5
test esi, esi
je 0x40142a5
sub ecx, ebp
lea edx, [esi + 1]
cmp ecx, edx
jl 0x40145df
push esi
push eax
mov eax, dword [esp + 0x90]
lea ecx, [eax + ebp]
push ecx
call sub.msvcr80.dll_memcpy
mov ecx, dword [esp + 0x98]
add esp, 0xc
add ebp, esi
cmp ebp, ecx
jge 0x40142c5
mov edx, dword [esp + 0x88]
mov byte [edx + ebp], 1
add ebp, 1
cmp ebp, ecx
jge 0x40142d3
add dword [esp + 0x84], 1
jmp 0x40142d3
test dword [esp + 0x7c], 0x1000000
je 0x40145df
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x20]
cmp esi, ecx
jae 0x4014554
cmp dword [esp + 0x80], 0
je 0x4014371
mov eax, dword [esp + 0x8c]
cmp ebp, eax
jge 0x4014324
mov dl, byte [0x409ccf0]
mov edi, dword [esp + 0x88]
mov byte [edi + ebp], dl
mov edx, 1
add ebp, edx
cmp ebp, eax
jge 0x401435c
add dword [esp + 0x84], edx
mov dword [esp + 0x28], edx
jmp 0x4014332
test dword [esp + 0x7c], 0x1000000
je 0x40145df
cmp ebp, eax
jge 0x401435c
mov dl, byte [0x409ccf1]
mov edi, dword [esp + 0x88]
mov byte [edi + ebp], dl
add ebp, 1
cmp ebp, eax
jge 0x401436a
add dword [esp + 0x84], 1
mov eax, 2
jmp 0x4014373
test dword [esp + 0x7c], 0x1000000
je 0x40145df
mov eax, 2
jmp 0x4014373
xor eax, eax
sub ecx, 1
cmp eax, 4
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
jge 0x4014554
sub ecx, esi
add ecx, 1
mov dword [esp + 0x50], ecx
mov eax, dword [esp + 0x50]
test eax, eax
mov dword [esp + 0x78], eax
je 0x40144fb
mov eax, dword [esp + 0x1c]
mov cl, byte [eax + 0x409ccec]
imul eax, dword [esp + 0x34]
mov esi, dword [esp + 0x20]
mov edx, eax
sub edx, dword [esp + 0x50]
add edx, esi
mov esi, dword [esp + 0x78]
nop
cmp byte [edx + esi], cl
jne 0x40143cf
sub esi, 1
jne 0x40143c0
jmp 0x40144fb
test esi, esi
mov dword [esp + 0x78], esi
je 0x40144fb
test dword [esp + 0x7c], 0x1000000
je 0x40144c2
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0x8c]
shl esi, 4
mov edx, dword [esi + 0x409cd0c]
add eax, ecx
mov dword [esp + 0x4c], eax
mov bl, 0x80
sub edi, ebp
jmp 0x4014410
mov ecx, dword [esp + 0x4c]
mov al, byte [ecx]
sub dword [esp + 0x78], 1
add ecx, 1
cmp dword [esp + 0x1c], 1
mov dword [esp + 0x4c], ecx
jne 0x4014431
mov cl, al
shr cl, 1
and al, 1
or al, cl
movzx ecx, byte [esi + 0x409cd00]
and cl, al
movzx eax, cl
movzx ecx, byte [esi + 0x409cd04]
shr al, cl
mov byte [esp + 0x80], al
movzx eax, byte [esi + 0x409cd08]
imul dl
mov cl, al
movzx eax, byte [esp + 0x80]
shl al, cl
or bl, al
test edx, edx
jne 0x401448b
cmp edi, 2
jl 0x40145df
mov edx, dword [esp + 0x88]
mov byte [edx + ebp], bl
mov edx, dword [esi + 0x409cd0c]
add ebp, 1
sub edi, 1
mov bl, 0x80
jmp 0x401448e
sub edx, 1
cmp dword [esp + 0x78], 0
jne 0x4014410
cmp edx, dword [esi + 0x409cd0c]
je 0x40144fb
mov eax, dword [esp + 0x8c]
sub eax, ebp
cmp eax, 2
jl 0x40145df
mov ecx, dword [esp + 0x88]
mov byte [ecx + ebp], bl
add ebp, 1
jmp 0x40144fb
mov edx, dword [esp + 0x8c]
mov ecx, dword [esp + 0x78]
sub edx, ebp
add ecx, 1
cmp edx, ecx
jl 0x40145df
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x78]
add eax, edx
push esi
push eax
mov eax, dword [esp + 0x90]
lea ecx, [eax + ebp]
push ecx
call sub.msvcr80.dll_memcpy
add esp, 0xc
add ebp, esi
mov eax, dword [esp + 0x8c]
cmp ebp, eax
jge 0x4014532
mov edx, dword [esp + 0x1c]
mov cl, byte [edx + 0x409ccf0]
mov edx, dword [esp + 0x88]
mov byte [edx + ebp], cl
mov ecx, 1
add ebp, ecx
cmp ebp, eax
jge 0x4014540
add dword [esp + 0x84], ecx
add dword [esp + 0x28], ecx
jmp 0x4014540
test dword [esp + 0x7c], 0x1000000
je 0x40145df
mov eax, dword [esp + 0x1c]
add eax, 1
cmp eax, 4
mov dword [esp + 0x1c], eax
jl 0x4014390
mov ecx, dword [esp + 0x8c]
cmp ebp, ecx
jge 0x401457d
mov esi, dword [esp + 0x88]
mov edi, dword [esp + 0x84]
mov byte [esi + ebp], 1
add ebp, 1
cmp ebp, ecx
jge 0x4014595
add edi, 1
jmp 0x4014595
test dword [esp + 0x7c], 0x1000000
je 0x40145df
mov esi, dword [esp + 0x88]
mov edi, dword [esp + 0x84]
cmp dword [esp + 0x48], 0
jne 0x40145c8
mov ebx, dword [esp + 0x3c]
mov eax, dword [esp + 0x54]
sub ebx, eax
je 0x40145c8
sub ecx, ebp
lea edx, [ebx + 1]
cmp ecx, edx
jl 0x40145df
push ebx
push eax
lea eax, [esi + ebp]
push eax
call sub.msvcr80.dll_memcpy
mov ecx, dword [esp + 0x98]
add esp, 0xc
add ebp, ebx
cmp ebp, ecx
jge 0x40145d5
mov byte [esi + ebp], 0
add ebp, 1
jmp 0x40145f9
test dword [esp + 0x7c], 0x1000000
jne 0x40145f4
mov ecx, dword [esp + 0x58]
call fcn.04010770
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x64
ret 0x18
mov byte [esi + ecx - 1], 0
test edi, edi
je 0x4014636
test dword [esp + 0x7c], 0x1000000
je 0x4014636
mov eax, dword [esp + 0x28]
jmp 0x4014610
sub edi, 1
test eax, eax
je 0x4014623
mov cl, byte [esi + ebp - 2]
cmp cl, byte [edi + 0x409ccf4]
jmp 0x4014628
cmp byte [esi + ebp - 2], 1
jne 0x4014636
mov byte [esi + ebp - 2], 0
sub ebp, 1
test edi, edi
jne 0x4014610
mov ecx, dword [esp + 0x58]
call fcn.04010770
mov eax, ebp
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x64
ret 0x18
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x64
ret 0x18