Function at 0x407e7b
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x618
mov eax, dword [0x4294a4]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x610], 0
push ebx
push esi
mov esi, ecx
push edi
push 0x52
lea edx, [esi + 0xec]
mov dword [ebp - 0x608], esi
lea edi, [esi + 0xf0]
call fcn.0040780f
pop ecx
test eax, eax
je 0x407ed3
movzx ecx, byte [eax - 1]
push ecx
push eax
lea eax, [ebp - 0x604]
push eax
mov dword [ebp - 0x610], ecx
call fcn.004147a0
add esp, 0xc
mov eax, dword [0x42d4f8]
mov ebx, dword [sym.imp.WS2_32.dll_inet_addr]
push 0x4461e4
mov dword [esi + 0xec], eax
call ebx
mov dword [ebp - 0x614], eax
push 0
lea ecx, [ebp - 0x614]
mov eax, esi
add eax, 0x10
push ecx
push eax
call fcn.0040b0ff
add esp, 0xc
test byte [0x42c088], 1
mov dword [ebp - 0x618], eax
je 0x407f1e
mov eax, dword [eax]
mov ecx, esi
mov dword [ecx + 0x14], eax
mov esi, dword [ebp - 0x618]
mov eax, dword [esi]
mov ecx, dword [ebp - 0x608]
mov dword [ecx + 0x14], eax
xor eax, eax
mov dword [ebp - 0x614], eax
mov ecx, dword [0x42c088]
test dword [eax + 0x42d428], ecx
je 0x4083f1
cmp byte [eax + 0x42d424], 0
je 0x407f66
mov cl, byte [eax + 0x42d420]
mov byte [edi], cl
mov cl, byte [eax + 0x42d424]
mov byte [edi + 1], cl
add edi, 2
mov eax, dword [eax + 0x42d420]
cmp eax, 0x35
ja 0x4081b3
je 0x4081a9
cmp eax, 0xd
ja 0x4080e5
je 0x408074
dec eax
je 0x408068
dec eax
dec eax
je 0x408038
sub eax, 3
je 0x407fae
dec eax
jne 0x4083dc
mov eax, dword [esi]
mov dword [edi], eax
jmp 0x4083dc
mov eax, 0x446224
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407fb6
sub eax, edx
je 0x4083dc
push 0x446224
call ebx
test eax, eax
je 0x4083dc
mov esi, 0x446264
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407fde
sub eax, edx
je 0x407ff5
push esi
call ebx
test eax, eax
je 0x407ff5
xor esi, esi
inc esi
jmp 0x407ff7
xor esi, esi
test esi, esi
setne al
mov byte [edi], 6
push 0x446224
add edi, 2
lea eax, [eax*4 + 4]
mov byte [edi - 1], al
call ebx
mov dword [edi], eax
test esi, esi
je 0x408023
push 0x446264
call ebx
mov dword [edi + 4], eax
xor eax, eax
test esi, esi
setne al
lea eax, [eax*4 + 4]
add edi, eax
jmp 0x4083dc
mov eax, 0x4462e4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408040
sub eax, edx
je 0x40805a
mov esi, 0x4462e4
push esi
call ebx
test eax, eax
je 0x40805a
push esi
jmp 0x40806d
mov eax, dword [ebp - 0x608]
mov eax, dword [eax + 0x10]
jmp 0x407fa7
push 0x4461e4
call ebx
jmp 0x407fa7
mov eax, dword [ebp - 0x608]
lea ecx, [eax + 0x1c]
push ecx
push dword [eax + 0x10]
lea esi, [ebp - 0x204]
mov ecx, 0x4463a4
call fcn.00409aec
pop ecx
pop ecx
push 0
push 0x80
push 3
push 0
push 1
push bind
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4083dc
push 0
push esi
mov word [edi], 0x20d
call dword [sym.imp.KERNEL32.dll_GetFileSize]
shr eax, 9
inc eax
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [edi + 2], ax
push esi
add edi, 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4083dc
sub eax, 0xf
je 0x408183
sub eax, 0x1b
je 0x408151
dec eax
dec eax
je 0x408114
sub eax, 7
jne 0x4083dc
mov eax, dword [0x446524]
imul eax, eax, 0x3c
push eax
call dword [sym.imp.WS2_32.dll_htonl]
jmp 0x407fa7
mov eax, 0x4462a4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40811c
sub eax, edx
je 0x4083dc
push 0x4462a4
call ebx
test eax, eax
je 0x4083dc
mov word [edi], 0x42c
push 0x4462a4
call ebx
mov dword [edi + 2], eax
add edi, 6
jmp 0x4083dc
mov eax, 0x446324
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408159
sub eax, edx
je 0x4083dc
push 0x446324
call ebx
test eax, eax
je 0x4083dc
mov word [edi], 0x42a
push 0x446324
jmp 0x408144
cmp byte [0x4464a4], 0
je 0x4083dc
mov esi, 0x4464a4
push esi
mov byte [edi], 0xf
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov byte [edi + 1], al
movzx eax, al
push eax
push esi
jmp 0x40821e
mov al, byte [ebp + 8]
mov byte [edi], al
jmp 0x4083dc
cmp eax, 0x52
ja 0x408345
je 0x408259
sub eax, 0x36
je 0x407fa5
sub eax, 4
je 0x40824a
dec eax
je 0x408237
sub eax, 7
jne 0x4083dc
mov byte [edi], 0x42
cmp byte [0x42c004], al
je 0x4081ee
mov eax, 0x42c004
jmp 0x4081f6
push dword [esi]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov byte [edi + 1], al
cmp byte [0x42c004], 0
je 0x408210
mov eax, 0x42c004
jmp 0x408218
push dword [esi]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
movzx ecx, byte [edi + 1]
push ecx
push eax
lea eax, [edi + 2]
push eax
call fcn.004147a0
movzx eax, byte [edi + 1]
add esp, 0xc
lea edi, [edi + eax + 2]
jmp 0x4083dc
mov eax, dword [0x446524]
imul eax, eax, 0x50
push 0x64
cdq
pop ecx
idiv ecx
jmp 0x408105
mov eax, dword [0x446524]
cdq
sub eax, edx
sar eax, 1
jmp 0x408105
mov eax, dword [ebp - 0x610]
test eax, eax
je 0x4083dc
mov byte [edi], 0x52
push eax
mov byte [edi + 1], al
lea eax, [ebp - 0x604]
push eax
add edi, 2
push edi
call fcn.004147a0
mov eax, dword [ebp - 0x610]
add esp, 0xc
add edi, eax
lea esi, [ebp - 0x604]
mov byte [ebp - 0x84], 0
mov byte [ebp - 0x104], 0
lea ebx, [ebp + eax - 0x606]
cmp esi, ebx
jae 0x408317
mov cl, byte [esi]
cmp cl, 1
jne 0x4082d8
mov al, byte [esi + 1]
cmp al, 0x7f
jae 0x4082d8
movzx eax, al
push eax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0x104]
push eax
call fcn.004147a0
movzx eax, byte [esi + 1]
mov byte [ebp + eax - 0x104], 0
jmp 0x408304
cmp cl, 2
jne 0x408311
mov al, byte [esi + 1]
cmp al, 0x7f
jae 0x408311
movzx eax, al
push eax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.004147a0
movzx eax, byte [esi + 1]
mov byte [ebp + eax - 0x84], 0
movzx eax, byte [esi + 1]
add esp, 0xc
lea esi, [esi + eax + 2]
jmp 0x408313
xor esi, esi
test esi, esi
jne 0x4082a4
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x104]
push eax
push dword [ebp - 0x610]
push str.Adding_option_82__length:__d___CirID:___s___RemID:___s__
push 5
call fcn.0040764f
mov ebx, dword [sym.imp.WS2_32.dll_inet_addr]
add esp, 0x14
jmp 0x4083dc
sub eax, 0x78
je 0x4083a8
sub eax, 0x86
je 0x40835e
dec eax
jne 0x4083dc
mov byte [edi], 0xff
inc edi
jmp 0x4083dc
xor esi, esi
cmp dword [esi + 0x44652c], 0
je 0x408398
mov al, byte [esi + 0x44652c]
mov byte [edi], al
mov eax, dword [ebp - 0x608]
push dword [eax + 0x10]
lea edx, [eax + 0x1c]
lea eax, [esi + 0x446530]
push eax
lea ecx, [edi + 2]
call fcn.0040954b
mov byte [edi + 1], al
movzx eax, al
pop ecx
pop ecx
lea edi, [edi + eax + 2]
add esi, 0x84
cmp esi, 0x528
jb 0x408360
jmp 0x4083dc
mov eax, 0x446364
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083b0
sub eax, edx
je 0x4083dc
push 0x446364
call ebx
test eax, eax
je 0x4083dc
mov word [edi], 0x578
push 0x446364
mov byte [edi + 2], 1
call ebx
mov dword [edi + 3], eax
add edi, 7
mov eax, dword [ebp - 0x614]
movsx ecx, byte [eax + 0x42d424]
mov esi, dword [ebp - 0x618]
add edi, ecx
add eax, 0xc
mov dword [ebp - 0x614], eax
cmp eax, 0xd8
jb 0x407f37
mov ecx, dword [ebp - 4]
mov eax, edi
sub eax, dword [ebp - 0x608]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00411a98
leave
ret