Function at 0x478320
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x98
mov eax, dword [0x517748]
xor eax, esp
mov dword [esp + 0x94], eax
mov eax, dword [ebp + 0x10]
push esi
mov dword [esp + 0x5c], eax
xor eax, eax
push edi
mov edi, ecx
mov dword [esp + 0x20], eax
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x18], edi
mov eax, dword [edi + 0x28]
mov dword [esp + 0x3c], eax
inc eax
mov dword [edi + 0x28], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x14], eax
test eax, eax
jne 0x478383
mov ecx, edi
call fcn.0049c800
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x4c]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
shr eax, 2
and eax, 1
mov dword [esp + 0x6c], eax
test ecx, ecx
je 0x4783df
test dword [edx + 4], 0x800
je 0x4783df
mov eax, dword [edx + 0x14]
xor esi, esi
mov edi, dword [eax]
mov eax, dword [edi]
mov dword [esp + 0x2c], eax
test eax, eax
jle 0x4783d0
mov edi, dword [edi + 4]
mov ecx, dword [edi]
call fcn.00477f90
test eax, eax
mov eax, dword [esp + 0x2c]
jne 0x4783c8
inc esi
add edi, 0x18
cmp esi, eax
jl 0x4783b1
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x4c]
xor edi, edi
cmp esi, eax
cmove ecx, edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x4c], ecx
cmp dword [edi + 0x24], 0
jne 0x478b4f
mov ecx, edx
call fcn.00478140
test eax, eax
je 0x478b4f
mov ecx, dword [eax]
mov eax, dword [eax + 0x1c]
mov edx, dword [edi]
mov dword [esp + 0x64], ecx
mov ecx, dword [ecx]
mov edi, dword [eax + 0x18]
mov dword [esp + 0x28], ecx
mov ecx, 0xfff0bdc0
mov dword [esp + 0x68], edx
mov dword [esp + 0x2c], edi
mov esi, dword [edi + 0x40]
test esi, esi
je 0x47843f
mov edx, dword [edx + 0x14]
xor ecx, ecx
test edx, edx
jle 0x47843f
mov eax, dword [esp + 0x68]
mov eax, dword [eax + 0x10]
add eax, 0xc
cmp dword [eax], esi
je 0x47843f
inc ecx
add eax, 0x10
cmp ecx, edx
jl 0x478433
movsx eax, cx
mov esi, 1
mov ecx, dword [esp + 0x18]
mov edx, ecx
mov dword [esp + 0x54], eax
mov eax, dword [ecx + 0x7c]
test eax, eax
mov ecx, dword [esp + 0x54]
cmovne edx, eax
shl esi, cl
mov eax, dword [edx + 0x60]
test esi, eax
jne 0x47847b
or eax, esi
mov dword [edx + 0x60], eax
cmp ecx, 1
jne 0x47847b
mov ecx, edx
call fcn.00487bf0
mov ecx, dword [esp + 0x54]
push dword [edi]
mov edx, ecx
mov ecx, dword [esp + 0x1c]
push 0
push dword [edi + 0x1c]
call fcn.004817b0
mov edx, dword [esp + 0x34]
add esp, 0xc
cmp edx, 1
jne 0x47852a
mov eax, dword [esp + 0x64]
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp word [eax + 0x20], 0
jge 0x47852a
mov ecx, dword [esp + 0x14]
mov edx, 0x14
call fcn.00460d00
mov edx, dword [esp + 0x3c]
mov esi, eax
mov ecx, dword [esp + 0x18]
push 0x68
push edi
push dword [esp + 0x5c]
call fcn.00490520
mov edi, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x20], 1
mov edx, dword [edi + 0x88]
test esi, esi
jns 0x4784ed
lea esi, [edx - 1]
mov eax, dword [edi]
cmp byte [eax + 0x45], 0
je 0x47850d
mov ecx, dword [esp + 0x3c]
mov eax, 0x66bf04
mov dword [eax + 8], edx
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x1c], ecx
jmp 0x478c64
mov eax, dword [edi + 0x58]
lea ecx, [esi + esi*4]
mov dword [eax + ecx*4 + 8], edx
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
mov dword [eax + 0x1c], ecx
jmp 0x478c64
mov dword [esp + 0x40], 0
mov eax, 1
mov dword [esp + 0x30], eax
test edx, edx
jle 0x478626
xor esi, esi
test eax, eax
je 0x478b4b
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0xc]
mov al, byte [ecx]
mov byte [esp + 0x13], al
cmp al, 0x9d
jne 0x478561
mov al, byte [ecx + 0x26]
cmp al, 0x9e
jne 0x47856e
mov eax, dword [ecx + 0x14]
mov edx, dword [eax]
mov edi, edx
jmp 0x478579
cmp al, 0x77
jne 0x478596
mov eax, dword [ecx + 0x14]
mov edx, dword [eax]
mov edi, dword [edx]
cmp edi, 1
jle 0x478596
cmp byte [esp + 0x13], 0x77
je 0x478590
cmp byte [ecx + 0x26], 0x77
je 0x478590
mov eax, dword [eax + 4]
jmp 0x478593
mov eax, dword [edx + 4]
mov ecx, dword [esi + eax]
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x2c]
mov eax, dword [eax + 4]
mov eax, dword [eax + esi]
movsx edx, word [eax + 0x20]
test edx, edx
js 0x4785b7
mov eax, dword [edi + 4]
add edx, edx
mov al, byte [eax + edx*8 + 0xd]
jmp 0x4785b9
mov al, 0x44
mov byte [esp + 0x13], al
call fcn.00475500
mov cl, byte [esp + 0x13]
test al, al
je 0x4785df
test cl, cl
je 0x4785e7
cmp al, 0x43
jge 0x4785db
cmp cl, 0x43
jge 0x4785db
mov al, 0x41
jmp 0x4785e9
mov al, 0x43
jmp 0x4785e9
test cl, cl
jne 0x4785e7
mov al, 0x41
jmp 0x4785e9
add al, cl
movsx eax, al
sub eax, 0x41
je 0x478602
dec eax
je 0x478602
xor eax, eax
cmp cl, 0x43
setge al
mov dword [esp + 0x30], eax
jmp 0x478606
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x40]
add esi, 0x18
mov edx, dword [esp + 0x28]
inc ecx
mov dword [esp + 0x40], ecx
cmp ecx, edx
jl 0x478545
test eax, eax
je 0x478b4b
mov edi, dword [edi + 8]
mov dword [esp + 0x24], edi
test edi, edi
je 0x478b4b
xor esi, esi
test esi, esi
jne 0x478be0
movzx eax, word [edi + 0x34]
mov ecx, eax
cmp ecx, edx
jl 0x478b34
cmp eax, 0x3f
jae 0x478b34
cmp dword [esp + 0x6c], esi
je 0x478676
movzx eax, word [edi + 0x32]
cmp eax, edx
jg 0x478b34
cmp ecx, edx
jle 0x478676
cmp byte [edi + 0x36], 0
je 0x478b34
mov dword [esp + 0x2c], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x40], xmm0
test edx, edx
jle 0x478867
mov eax, dword [esp + 0x44]
xor edi, edi
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 0x58], edi
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [eax + 0xc]
mov al, byte [edx]
mov byte [esp + 0x13], al
cmp al, 0x9d
jne 0x4786b9
mov al, byte [edx + 0x26]
cmp al, 0x9e
jne 0x4786c6
mov eax, dword [edx + 0x14]
mov ecx, dword [eax]
mov esi, ecx
jmp 0x4786d1
cmp al, 0x77
jne 0x4786ee
mov eax, dword [edx + 0x14]
mov ecx, dword [eax]
mov esi, dword [ecx]
cmp esi, 1
jle 0x4786ee
cmp byte [esp + 0x13], 0x77
je 0x4786e8
cmp byte [edx + 0x26], 0x77
je 0x4786e8
mov eax, dword [eax + 4]
jmp 0x4786eb
mov eax, dword [ecx + 4]
mov edx, dword [edi + eax]
test dword [edx + 4], 0x100
mov eax, dword [esp + 0x64]
mov eax, dword [eax + 4]
mov esi, dword [edi + eax]
je 0x478712
mov ecx, dword [esp + 0x18]
call fcn.004756e0
mov ecx, eax
mov dword [esp + 0x30], ecx
jmp 0x478756
test esi, esi
je 0x478732
test dword [esi + 4], 0x100
je 0x478732
mov ecx, dword [esp + 0x18]
mov edx, esi
call fcn.004756e0
mov ecx, eax
mov dword [esp + 0x30], ecx
jmp 0x478756
mov edi, dword [esp + 0x18]
mov ecx, edi
call fcn.004756e0
mov ecx, eax
mov dword [esp + 0x30], ecx
test ecx, ecx
jne 0x478756
mov edx, esi
mov ecx, edi
call fcn.004756e0
mov ecx, eax
mov dword [esp + 0x30], eax
movzx edx, word [esi + 0x20]
xor edi, edi
mov dword [esp + 0x34], edi
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x34]
mov dword [esp + 0x40], edx
mov eax, dword [edi + 4]
mov dword [esp + 0x5c], eax
cmp word [eax], dx
jne 0x4787e5
test ecx, ecx
je 0x4787ff
mov eax, dword [ecx]
mov ecx, dword [edi + 0x20]
mov dl, byte [eax]
mov edi, dword [ecx + esi*4]
movzx ecx, dl
movzx esi, byte [ecx + 0x5039c0]
movzx ecx, byte [edi]
movzx ecx, byte [ecx + 0x5039c0]
sub esi, ecx
jne 0x4787d5
sub edi, eax
test dl, dl
je 0x4787d1
mov cl, byte [eax + 1]
inc eax
mov byte [esp + 0x13], cl
movzx ecx, byte [edi + eax]
movzx edx, byte [ecx + 0x5039c0]
movzx ecx, byte [esp + 0x13]
movzx esi, byte [ecx + 0x5039c0]
sub esi, edx
mov dl, byte [esp + 0x13]
je 0x4787a4
jmp 0x4787d5
test esi, esi
je 0x4787ff
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x5c]
mov edx, dword [esp + 0x40]
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
inc esi
add eax, 2
mov dword [esp + 0x34], esi
mov dword [esp + 0x5c], eax
cmp esi, dword [esp + 0x28]
jl 0x478773
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x28]
cmp edi, edx
je 0x478879
xor edx, edx
mov eax, edi
bts edx, eax
xor esi, esi
cmp eax, 0x20
cmovae esi, edx
xor edx, esi
cmp eax, 0x40
mov ecx, edx
cmovae esi, edx
and ecx, dword [esp + 0x50]
mov eax, esi
and eax, dword [esp + 0x38]
or ecx, eax
jne 0x478875
or dword [esp + 0x50], edx
or dword [esp + 0x38], esi
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x2c]
test eax, eax
je 0x478849
mov dword [eax + ecx*4], edi
mov edi, dword [esp + 0x58]
inc ecx
mov edx, dword [esp + 0x28]
add edi, 0x18
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x58], edi
cmp ecx, edx
jl 0x4786a5
jmp 0x478879
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov dword [esp + 0x50], eax
jmp 0x478881
mov edx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x38]
mov eax, edx
xor ecx, ecx
xor edx, edx
bts ecx, eax
cmp eax, 0x20
cmovae edx, ecx
xor ecx, edx
cmp eax, 0x40
cmovae edx, ecx
add ecx, 0xffffffff
adc edx, 0xffffffff
cmp dword [esp + 0x50], ecx
jne 0x478b2c
cmp esi, edx
jne 0x478b2c
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 0xc]
mov esi, dword [ecx + 0x88]
cmp dword [eax + 0x30], esi
jg 0x4788d9
push 0
push 0
push 0
mov edx, 0x14
call fcn.00460c40
add esp, 0xc
mov esi, eax
jmp 0x478917
lea eax, [esi + 1]
mov dword [ecx + 0x88], eax
lea ecx, [esi + esi*4]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x58]
mov word [eax + ecx*4], 0x14
mov byte [eax + ecx*4 + 3], 0
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
push dword [edi]
push str.USING_INDEX__s_FOR_IN_OPERATOR
push dword [esp + 0x70]
call fcn.00443940
mov ecx, dword [esp + 0x20]
mov edi, eax
add esp, 0xc
mov eax, dword [ecx + 0xc]
mov edx, dword [ecx + 0x88]
cmp dword [eax + 0x30], edx
jg 0x478955
push 0
push 0
push 0
mov edx, 0xa2
call fcn.00460c40
add esp, 0xc
mov edx, eax
jmp 0x478993
lea eax, [edx + 1]
mov dword [ecx + 0x88], eax
lea ecx, [edx + edx*4]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x58]
mov word [eax + ecx*4], 0xa2
mov byte [eax + ecx*4 + 3], 0
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 8], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
cmp byte [ecx + 0x45], 0
je 0x4789ad
push edi
or edx, 0xffffffff
call fcn.004618a0
add esp, 4
jmp 0x4789e6
test edx, edx
jns 0x4789b8
mov edx, dword [eax + 0x88]
dec edx
mov eax, dword [eax + 0x58]
lea ecx, [edx + edx*4]
cmp byte [eax + ecx*4 + 1], 0
lea eax, [eax + ecx*4]
je 0x4789db
mov ecx, dword [esp + 0x14]
mov edx, eax
push 0xffffffffffffffff
push edi
call fcn.00461a90
add esp, 8
jmp 0x4789e6
test edi, edi
je 0x4789e6
mov dword [eax + 0x10], edi
mov byte [eax + 1], 0xff
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
mov ecx, dword [eax + 0x88]
mov eax, dword [eax + 0xc]
mov edx, dword [edi + 0x2c]
cmp dword [eax + 0x30], ecx
jg 0x478a1b
push dword [esp + 0x54]
mov ecx, dword [esp + 0x18]
push edx
push dword [esp + 0x44]
mov edx, 0x68
call fcn.00460c40
add esp, 0xc
jmp 0x478a5b
mov edi, dword [esp + 0x14]
lea eax, [ecx + 1]
lea ecx, [ecx + ecx*4]
mov dword [edi + 0x88], eax
mov eax, edi
mov edi, dword [esp + 0x3c]
mov eax, dword [eax + 0x58]
mov dword [eax + ecx*4 + 8], edx
mov edx, dword [esp + 0x54]
mov dword [eax + ecx*4 + 4], edi
mov edi, dword [esp + 0x24]
mov word [eax + ecx*4], 0x68
mov byte [eax + ecx*4 + 3], 0
mov dword [eax + ecx*4 + 0xc], edx
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esp + 0x18]
mov edx, edi
mov eax, dword [ecx + 8]
mov dword [esp + 0x58], eax
call fcn.00488490
mov ecx, dword [esp + 0x58]
mov edi, eax
mov eax, dword [ecx]
cmp byte [eax + 0x45], 0
je 0x478a8d
push edi
mov edx, 0xfffffffa
mov ecx, eax
call fcn.004618a0
add esp, 4
jmp 0x478abe
mov eax, dword [ecx + 0x88]
dec eax
lea edx, [eax + eax*4]
mov eax, dword [ecx + 0x58]
cmp byte [eax + edx*4 + 1], 0
lea eax, [eax + edx*4]
je 0x478ab3
push 0xfffffffffffffffa
push edi
mov edx, eax
call fcn.00461a90
add esp, 8
jmp 0x478abe
test edi, edi
je 0x478abe
mov dword [eax + 0x10], edi
mov byte [eax + 1], 0xfa
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x4c]
mov eax, dword [edi + 0x1c]
movzx eax, byte [eax]
add eax, 3
mov dword [esp + 0x20], eax
test edx, edx
je 0x478afc
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx + 0x2c]
inc eax
cmp dword [esp + 0x28], 1
mov dword [ecx + 0x2c], eax
mov dword [edx], eax
jne 0x478afc
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x14]
push eax
call fcn.004781b0
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [eax + 0x88]
test esi, esi
jns 0x478b0d
lea esi, [edx - 1]
mov eax, dword [eax]
cmp byte [eax + 0x45], 0
je 0x478b1c
mov eax, 0x66bf04
jmp 0x478b29
mov eax, dword [esp + 0x14]
lea ecx, [esi + esi*4]
mov eax, dword [eax + 0x58]
lea eax, [eax + ecx*4]
mov dword [eax + 8], edx
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
mov edi, dword [edi + 0x14]
mov dword [esp + 0x24], edi
test edi, edi
jne 0x478637
test esi, esi
jne 0x478be0
mov edi, dword [esp + 0x18]
test byte [ebp + 8], 1
mov eax, dword [esp + 0x1c]
je 0x478bf4
test dword [eax + 4], 0x800
jne 0x478bf4
mov esi, dword [eax + 0xc]
lea ecx, [esp + 0x70]
xorps xmm0, xmm0
mov dword [esp + 0x88], 0
movdqa xmmword [esp + 0x70], xmm0
mov edx, eax
movq qword [esp + 0x80], xmm0
mov dword [eax + 0xc], 0
mov byte [esp + 0x84], 1
mov dword [esp + 0x74], 0x477ca0
mov dword [esp + 0x78], 0x477d90
mov dword [esp + 0x88], 0
call fcn.00473230
cmp byte [esp + 0x84], 0
mov eax, dword [esp + 0x1c]
mov dword [eax + 0xc], esi
je 0x478bd8
mov eax, dword [eax + 0x14]
cmp dword [eax], 2
jg 0x478bf0
mov dword [esp + 0x20], 5
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x3c]
mov dword [eax + 0x1c], ecx
jmp 0x478c64
mov eax, dword [esp + 0x1c]
mov esi, dword [edi + 0x88]
xor ecx, ecx
test byte [ebp + 8], 4
mov edx, 2
mov dword [esp + 0x20], edx
je 0x478c32
mov dword [edi + 0x88], ecx
mov eax, dword [eax + 0xc]
cmp word [eax + 0x20], cx
jge 0x478c42
mov eax, dword [esp + 0x1c]
test dword [eax + 4], 0x800
jne 0x478c42
mov edx, 1
mov dword [esp + 0x20], edx
jmp 0x478c42
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x478c42
inc dword [edi + 0x2c]
mov ecx, dword [edi + 0x2c]
mov dword [eax], ecx
xor eax, eax
cmp edx, 1
mov edx, dword [esp + 0x1c]
sete al
push eax
push ecx
mov ecx, edi
call fcn.00478ec0
mov eax, dword [esp + 0x24]
add esp, 8
mov dword [edi + 0x88], esi
mov edi, dword [esp + 0x60]
test edi, edi
je 0x478d3e
mov edx, dword [esp + 0x20]
cmp edx, 3
je 0x478d28
cmp edx, 4
je 0x478d28
mov ecx, dword [eax + 0xc]
mov al, byte [ecx]
cmp al, 0x9d
jne 0x478c92
mov al, byte [ecx + 0x26]
cmp al, 0x9e
jne 0x478c9d
mov eax, dword [ecx + 0x14]
mov esi, dword [eax]
jmp 0x478caf
cmp al, 0x77
jne 0x478caa
mov eax, dword [ecx + 0x14]
mov eax, dword [eax]
mov esi, dword [eax]
jmp 0x478caf
mov esi, 1
xor ecx, ecx
test esi, esi
jle 0x478d28
cmp esi, 8
jb 0x478d19
movdqa xmm1, xmmword [0x50c7d0]
mov eax, esi
and eax, reloc.WS2_32.dll_getsockopt
jns 0x478cd4
dec eax
or eax, 0xfffffff8
inc eax
mov edx, dword [esp + 0x60]
mov edi, esi
sub edi, eax
lea esp, [esp]
movd xmm0, ecx
lea eax, [ecx + 4]
pshufd xmm0, xmm0, 0
lea edx, [edx + 0x20]
paddd xmm0, xmm1
add ecx, 8
movdqu xmmword [edx - 0x20], xmm0
movd xmm0, eax
pshufd xmm0, xmm0, 0
paddd xmm0, xmm1
movdqu xmmword [edx - 0x10], xmm0
cmp ecx, edi
jl 0x478ce0
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x60]
cmp ecx, esi
jge 0x478d28
lea ecx, [ecx]
mov dword [edi + ecx*4], ecx
inc ecx
cmp ecx, esi
jl 0x478d20
mov eax, edx
pop edi
pop esi
mov ecx, dword [esp + 0x94]
xor ecx, esp
call fcn.004c0564
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x9c]
mov eax, dword [esp + 0x20]
pop edi
pop esi
xor ecx, esp
call fcn.004c0564
mov esp, ebp
pop ebp
ret