Function at 0x10040eb0
Capabilities:
Encrypt data using blowfish

Disassembly:
sub esp, 0x10
mov ecx, 0xc
sub ecx, 0x1008220c
mov dword [esp], ecx
push ebx
mov ecx, 0x10
sub ecx, 0x1008220c
push ebp
push edi
mov dword [esp + 0x14], ecx
mov edi, 8
sub edi, 0x1008220c
mov ecx, 0x14
xor edx, edx
sub ecx, 0x1008220c
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], ecx
jmp 0x10040f04
mov edi, dword [esp + 0x10]
mov ebp, dword [edx + 0x10082208]
mov ebx, dword [esi + 4]
mov dword [edx + ebx], ebp
mov ebp, dword [edx + 0x1008220c]
mov ebx, dword [esi + 4]
lea ecx, [edx + 0x1008220c]
mov dword [edx + ebx + 4], ebp
mov ebx, dword [esi + 4]
mov ebp, dword [ecx + 4]
add ebx, ecx
mov dword [ebx + edi], ebp
mov edi, dword [esi + 4]
mov ebx, dword [ecx + 8]
mov ebp, dword [esp + 0xc]
add edi, ecx
mov dword [edi + ebp], ebx
mov edi, dword [esi + 4]
mov ebx, dword [ecx + 0xc]
mov ebp, dword [esp + 0x14]
add edi, ecx
mov dword [edi + ebp], ebx
mov edi, dword [esi + 4]
mov ebx, dword [esp + 0x18]
add edi, ecx
mov ecx, dword [ecx + 0x10]
add edx, 0x18
cmp edx, 0x48
mov dword [edi + ebx], ecx
jl 0x10040f00
mov ecx, 8
sub ecx, 0x10082254
mov dword [esp + 0x18], ecx
xor ecx, ecx
jmp 0x10040f80
lea edx, [ecx + 0xc]
mov edi, 0x40
jmp 0x10040f90
mov ebp, dword [ecx + 0x10082250]
mov ebx, dword [esi + 8]
mov dword [ecx + ebx], ebp
mov ebp, dword [ecx + 0x10082254]
mov ebx, dword [esi + 8]
mov dword [ebx + ecx + 4], ebp
mov ebx, dword [esi + 8]
add ebx, dword [esp + 0x18]
mov ebp, dword [ecx + 0x10082258]
mov dword [ebx + ecx + 0x10082254], ebp
mov ebp, dword [ecx + 0x1008225c]
mov ebx, dword [esi + 8]
mov dword [edx + ebx], ebp
add ecx, 0x10
add edx, 0x10
sub edi, 1
jne 0x10040f90
cmp ecx, 0x1000
jl 0x10040f80
mov ecx, 0xc
mov edx, dword [esi + 4]
lea ebp, [ecx + edx - 0xc]
lea edx, [edi + 1]
and edx, reloc.WS2_32.dll_getsockopt
jns 0x10040ff8
dec edx
or edx, 0xfffffff8
inc edx
movzx edx, byte [edx + eax]
mov dh, byte [edi + eax]
lea ebx, [edi + 2]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x10041012
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
lea ebx, [edi + 3]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x1004102b
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
xor dword [ebp], edx
add edi, 4
and edi, reloc.WS2_32.dll_getsockopt
jns 0x10041044
dec edi
or edi, 0xfffffff8
inc edi
mov edx, dword [esi + 4]
lea ebp, [ecx + edx - 8]
lea edx, [edi + 1]
and edx, reloc.WS2_32.dll_getsockopt
jns 0x1004105b
dec edx
or edx, 0xfffffff8
inc edx
movzx edx, byte [edx + eax]
mov dh, byte [edi + eax]
lea ebx, [edi + 2]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x10041075
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
lea ebx, [edi + 3]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x1004108e
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
xor dword [ebp], edx
add edi, 4
and edi, reloc.WS2_32.dll_getsockopt
jns 0x100410a7
dec edi
or edi, 0xfffffff8
inc edi
mov edx, dword [esi + 4]
lea ebp, [ecx + edx - 4]
lea edx, [edi + 1]
and edx, reloc.WS2_32.dll_getsockopt
jns 0x100410be
dec edx
or edx, 0xfffffff8
inc edx
movzx edx, byte [edx + eax]
mov dh, byte [edi + eax]
lea ebx, [edi + 2]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x100410d8
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
lea ebx, [edi + 3]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x100410f1
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
xor dword [ebp], edx
add edi, 4
and edi, reloc.WS2_32.dll_getsockopt
jns 0x1004110a
dec edi
or edi, 0xfffffff8
inc edi
mov edx, dword [esi + 4]
lea ebp, [ecx + edx]
lea edx, [edi + 1]
and edx, reloc.WS2_32.dll_getsockopt
jns 0x10041120
dec edx
or edx, 0xfffffff8
inc edx
movzx edx, byte [edx + eax]
mov dh, byte [edi + eax]
lea ebx, [edi + 2]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x1004113a
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
lea ebx, [edi + 3]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x10041153
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
xor dword [ebp], edx
add edi, 4
and edi, reloc.WS2_32.dll_getsockopt
jns 0x1004116c
dec edi
or edi, 0xfffffff8
inc edi
mov edx, dword [esi + 4]
lea ebp, [ecx + edx + 4]
lea edx, [edi + 1]
and edx, reloc.WS2_32.dll_getsockopt
jns 0x10041183
dec edx
or edx, 0xfffffff8
inc edx
movzx edx, byte [edx + eax]
mov dh, byte [edi + eax]
lea ebx, [edi + 2]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x1004119d
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
lea ebx, [edi + 3]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x100411b6
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
xor dword [ebp], edx
add edi, 4
and edi, reloc.WS2_32.dll_getsockopt
jns 0x100411cf
dec edi
or edi, 0xfffffff8
inc edi
mov edx, dword [esi + 4]
lea ebp, [ecx + edx + 8]
lea edx, [edi + 1]
and edx, reloc.WS2_32.dll_getsockopt
jns 0x100411e6
dec edx
or edx, 0xfffffff8
inc edx
movzx edx, byte [edx + eax]
mov dh, byte [edi + eax]
lea ebx, [edi + 2]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x10041200
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
lea ebx, [edi + 3]
shl edx, 8
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x10041219
dec ebx
or ebx, 0xfffffff8
inc ebx
movzx ebx, byte [ebx + eax]
or edx, ebx
xor dword [ebp], edx
add edi, 4
and edi, reloc.WS2_32.dll_getsockopt
jns 0x10041232
dec edi
or edi, 0xfffffff8
inc edi
add ecx, 0x18
cmp ecx, 0x54
jl 0x10040fe1
xor ebx, ebx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], ebx
xor edi, edi
lea ebx, [ebx]
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
mov eax, esi
call fcn.10040730
mov edx, dword [esi + 4]
mov eax, dword [esp + 0xc]
mov dword [edi + edx], eax
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x10]
mov dword [edi + ecx + 4], edx
add edi, 8
cmp edi, 0x48
jl 0x10041250
xor edi, edi
mov ebx, 0x80
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
mov eax, esi
call fcn.10040730
mov edx, dword [esi + 8]
mov eax, dword [esp + 0xc]
mov dword [edi + edx], eax
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x10]
mov dword [edi + ecx + 4], edx
add edi, 8
sub ebx, 1
jne 0x10041285
cmp edi, 0x1000
jl 0x10041280
pop edi
pop ebp
pop ebx
add esp, 0x10
ret