Function at 0x401672
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0xa5c
mov edi, dword [0x407008]
mov ebp, edx
mov esi, 0x200
mov ebx, ecx
mov ecx, 0xff
lea eax, [esp + 0x25c]
push esi
push ecx
push eax
call fcn.00404379
add esp, 0xc
lea eax, [esp + 0x45c]
push esi
mov esi, ebx
mov ecx, 0xff
push ecx
push eax
call fcn.00404379
add esp, 0xc
imul eax, edi, 0xffffff01
mov ecx, ebx
mov dword [esp + 0x4c], ebp
xor edx, edx
mov dword [esp + 0x14], edi
mov dword [esp + 0x48], eax
mov eax, edi
shl eax, 8
mov dword [esp + 0x50], eax
imul eax, edi, 0xff
sub ecx, eax
add ecx, ebp
xor ebp, ebp
mov dword [esp + 0x24], ecx
cmp esi, dword [esp + 0xa78]
mov eax, 0
sbb eax, dword [esp + 0xa7c]
jae 0x401a45
mov ebx, edx
mov eax, esi
xor edx, edx
div edi
movzx eax, al
movzx ecx, word [esp + eax*2 + 0x45c]
cmp ecx, 0xffff
je 0x40172d
or word [esp + ecx*2 + 0x25c], 0xffff
add ebx, 0xffffffff
adc ebp, 0xffffffff
mov ecx, dword [esp + 0x4c]
movzx ecx, byte [ecx + esi]
movzx edx, word [esp + ecx*2 + 0x25c]
cmp edx, 0xffff
je 0x401752
or word [esp + edx*2 + 0x45c], 0xffff
mov edx, ebx
jmp 0x40175a
mov edx, ebx
add edx, 1
adc ebp, 0
mov word [esp + ecx*2 + 0x25c], ax
mov word [esp + eax*2 + 0x45c], cx
mov ecx, edx
xor ecx, 0x100
or ecx, ebp
jne 0x401a34
mov eax, dword [esp + 0x48]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x20], esi
mov ebp, dword [0x407008]
mov edi, dword [0x407010]
mov dword [esp + 0x1c], edx
add eax, esi
mov esi, dword [0x407014]
add eax, dword [esp + 0xa70]
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0xa74]
adc eax, 0
mov dword [esp + 0x40], eax
xor eax, eax
cmp eax, dword [esp + 0x50]
jae 0x4017ea
mov edx, dword [esp + 0x24]
mov ecx, dword [edx + eax]
mov edx, dword [edx + eax + 4]
mov ebx, ecx
and edx, esi
and ebx, edi
or ebx, edx
jne 0x401991
xor edx, edx
lea ebx, [eax + ebp]
div ebp
mov byte [esp + eax + 0x65c], cl
mov eax, ebx
jmp 0x4017b9
call fcn.004030b8
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
lea ecx, [esp + 0x28]
mov edx, str.Found_potential_RC4_table_at:_0xx:0_8_n
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 0x20]
mov dword [esp + 0x58], eax
lea eax, [esp + 0x58]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 0x401648
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0xc]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x28], edi
push 0x20
call fcn.004033c0
pop ecx
test ax, ax
jne 0x4018cf
mov ebp, dword [esp + 0x40]
xor edx, edx
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], esi
mov eax, ebp
push 0xf
pop edi
mov ecx, dword [esp + 0x44]
mov ebx, ecx
mov esi, ecx
and cl, 0xf
mov ch, cl
mov ebx, ecx
add bl, 0x57
or ch, 0x30
cmp cl, 0xa
movzx ecx, ch
movzx ebx, bl
cmovb ebx, ecx
mov ecx, ebp
shr eax, 4
mov byte [esp + edx + 0x9c], bl
shld ecx, esi, 0x1c
dec edx
cmp edi, esi
mov ebx, 0
sbb ebx, ebp
mov ebp, eax
jb 0x401853
lea eax, [esp + 0x9d]
lea ecx, [eax + edx]
lea eax, [esp + 0xc]
neg edx
push eax
push 0x4051bc
call fcn.004037d7
pop ecx
pop edx
test ax, ax
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
jne 0x4018cf
mov dword [esp], ecx
mov dword [esp + 4], eax
mov ecx, esp
lea edx, [0x4051b7]
push 1
call fcn.004033c0
pop ecx
call fcn.004030c3
push 0x100
lea eax, [esp + 0x660]
push eax
lea eax, [esp + 0x764]
push eax
call fcn.00404354
add esp, 0xc
xor edi, edi
cmp edi, 0x100
je 0x4019a6
mov al, byte [esp + edi + 0x75c]
mov esi, 0x200
lea edx, [esp + edi*2 + 0x85c]
sub esi, edi
sub esi, edi
mov dword [esp + 0x5c], edx
lea ecx, [esp + 0x5c]
xor edx, edx
mov dword [esp + 0x60], esi
and dword [esp + 0x64], 0
mov dword [esp + 0xc], ecx
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], 0x4031dd
mov ecx, eax
mov ah, al
and ah, 0xf
mov ch, ah
mov bl, ah
add bl, 0x57
or ch, 0x30
cmp ah, 0xa
movzx esi, ch
movzx ebx, bl
cmovb ebx, esi
shr cl, 4
mov byte [esp + edx + 8], bl
dec edx
cmp al, 0xf
mov eax, ecx
ja 0x40193f
lea eax, [esp + 9]
lea ecx, [eax + edx]
lea eax, [esp + 0x28]
neg edx
push eax
push 0x4050e0
call fcn.004037d7
pop ecx
pop edx
inc edi
test ax, ax
je 0x4018f3
jmp 0x401a3f
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
jmp 0x401a34
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x10]
mov esi, dword [eax + 0x1c]
push 0x200
lea eax, [esp + 0x860]
push eax
lea edi, [esp + 0x64]
push edi
call fcn.00404354
add esp, 0xc
lea eax, [esp + 0x54]
mov dword [esp + 0x54], esi
mov ecx, edi
mov edx, 0x200
mov dword [esp + 0x30], eax
lea eax, [esp + 0x30]
mov dword [esp + 0x34], 0x401648
push eax
push 0x4052d8
call fcn.004037d7
pop ecx
pop edx
test ax, ax
jne 0x401a52
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
lea edx, [0x4050fb]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov ecx, esp
push 1
call fcn.004033c0
pop ecx
mov esi, dword [esp + 0x20]
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
test ax, ax
jne 0x401a52
add dword [esp + 0x24], edi
add esi, edi
jmp 0x4016ea
mov ax, 0xb
jmp 0x401a47
xor eax, eax
add esp, 0xa5c
pop esi
pop edi
pop ebx
pop ebp
ret
jmp 0x401a47