Function at 0x40d470
Capabilities:
Check http status code

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x531ca0
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push ebp
mov ebp, dword [esp + 0x38]
mov eax, dword [ebp + 0x3304]
test eax, eax
push esi
push edi
jne 0x40d52b
mov eax, dword [ebp + 0x3300]
cmp eax, 0x64
jl 0x40d4b0
cmp eax, 0x258
jl 0x40d4ba
mov dword [ebp + 0x3300], 0x1f4
mov eax, dword [ebp + 0x3300]
cdq
mov ecx, 0x64
idiv ecx
mov ecx, dword [eax*4 + 0x586cd8]
add ecx, edx
cmp ecx, dword [eax*4 + 0x586cdc]
jl 0x40d4df
mov ecx, 0x2c
mov esi, dword [ecx*4 + 0x55d060]
mov eax, esi
lea edx, [eax + 1]
jmp 0x40d4f0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d4f0
sub eax, edx
cmp eax, 0x80
jle 0x40d505
mov eax, 0x80
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea edi, [ebp + 0x3308]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp + 0x3304], eax
mov byte [eax + ebp + 0x3308], 0
jmp 0x40d535
mov dword [ebp + 0x3300], 0xffffffff
call fcn.0051ffd3
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x40], eax
mov dword [esp + 0x38], 0
mov edi, dword [eax - 4]
mov eax, dword [eax - 8]
mov ecx, 1
sub ecx, edi
sub eax, 0x1000
or eax, ecx
jge 0x40d574
push 0x1000
lea ecx, [esp + 0x44]
call fcn.00403280
push 9
push str.HTTP_1.1
lea ecx, [esp + 0x48]
call fcn.00404200
lea esi, [ebp + 0x3308]
test esi, esi
jne 0x40d592
xor eax, eax
jmp 0x40d5a0
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d597
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x48]
call fcn.00404200
mov ebx, 2
push ebx
push 0x55ef9c
lea ecx, [esp + 0x48]
call fcn.00404200
mov eax, dword [ebp + 0x33b0]
push eax
lea eax, [ebp + 0x33b4]
push eax
lea ecx, [esp + 0x48]
call fcn.00404200
mov ecx, dword [ebp + 0x33a0]
neg ecx
sbb ecx, ecx
mov dword [esp + 0x18], ecx
call fcn.0051ffd3
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x1c], eax
mov byte [esp + 0x38], 1
call fcn.0051ffd3
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x38], bl
mov eax, dword [esp + 0x18]
test eax, eax
je 0x40d68f
lea edi, [ebp + 0x3394]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x20]
push edx
mov ecx, edi
call fcn.0051f167
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 0xc]
test eax, eax
je 0x40d687
mov edx, dword [esp + 0x14]
cmp dword [edx - 0xc], 0
je 0x40d687
push eax
push ecx
lea ecx, [esp + 0x48]
call fcn.00404200
push ebx
push 0x55efa0
lea ecx, [esp + 0x48]
call fcn.00404200
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x48]
call fcn.00404200
push ebx
push 0x55ef9c
lea ecx, [esp + 0x48]
call fcn.00404200
mov eax, dword [esp + 0x18]
test eax, eax
jne 0x40d621
mov eax, dword [ebp + 0x70]
test eax, eax
je 0x40d6a7
mov eax, dword [eax + 0x70]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x48]
call fcn.00404200
mov eax, dword [ebp + 0x3390]
test eax, eax
jne 0x40d7d0
mov eax, dword [ebp + 0x3300]
cmp eax, 0x130
je 0x40d7c7
cmp eax, 0xc8
je 0x40d7c7
cmp dword [ebp + 0x31e0], ebx
je 0x40d7b7
call fcn.0051ffd3
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x10], eax
push 0x13
push str._html__head__title_
lea ecx, [esp + 0x18]
mov byte [esp + 0x40], 3
call fcn.00403060
mov eax, dword [ebp + 0x3304]
push eax
push esi
lea ecx, [esp + 0x18]
call fcn.00404200
push 0x1b
push str.__title___head__r_n_body__h1_
lea ecx, [esp + 0x18]
call fcn.00404200
mov eax, dword [ebp + 0x3304]
push eax
push esi
lea ecx, [esp + 0x18]
call fcn.00404200
push 0x49
push str.__h1__hr__r_n_small_Host_by__a_href_http:__www.netbox.cn__target__blank__
lea ecx, [esp + 0x18]
call fcn.00404200
mov eax, dword [0x58d18c]
push eax
push 0x58d190
lea ecx, [esp + 0x18]
call fcn.00404200
push 0x1c
push str.__a___small__r_n__body___html_
lea ecx, [esp + 0x18]
call fcn.00404200
mov esi, dword [esp + 0x10]
mov eax, dword [esi - 0xc]
push eax
push str.Content_Length:__d_r_nContent_Type:_text_html_r_n_r_n
lea edi, [esp + 0x48]
call fcn.00404a40
mov eax, dword [esi - 0xc]
add esp, 8
push eax
push esi
mov ecx, edi
call fcn.00404200
lea eax, [esi - 0x10]
mov byte [esp + 0x38], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d837
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
jmp 0x40d837
push str.Content_Length:_100_r_nContent_Type:_text_html_r_n_r_n
lea ecx, [esp + 0x44]
call fcn.00404680
jmp 0x40d837
push 0x15
push str.Content_Length:_0_r_n_r_n
jmp 0x40d82e
mov eax, dword [ebp + 0x32a4]
test eax, eax
je 0x40d828
push 0x10
push str.Content_Length:
lea ecx, [esp + 0x48]
call fcn.00404200
mov ecx, dword [ebp + 0x338c]
push 0xa
lea eax, [esp + 0x24]
push eax
push ecx
call fcn.004bd30d
lea eax, [esp + 0x2c]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d807
sub eax, edx
push eax
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x48]
call fcn.00404200
push 4
push str._r_n_r_n
jmp 0x40d82e
push ebx
push 0x55ef9c
lea ecx, [esp + 0x48]
call fcn.00404200
mov esi, dword [esp + 0x40]
mov eax, dword [esi - 0xc]
mov ebx, dword [ebp + 0x6c]
mov ecx, esi
call fcn.00422e00
mov eax, 1
mov dword [ebp + 0x32a0], eax
mov byte [esp + 0x38], al
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d875
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov byte [esp + 0x38], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d898
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esi - 0x10]
mov dword [esp + 0x38], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
pop edi
pop esi
pop ebp
pop ebx
jg 0x40d8be
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret 4