Function at 0x10040230
Capabilities:
Encrypt data using blowfish

Disassembly:
sub esp, 0x10
mov ecx, 0xc
sub ecx, 0x1007f0ec
mov dword [esp], ecx
push ebx
mov ecx, 0x10
sub ecx, 0x1007f0ec
push ebp
push edi
mov dword [esp + 0x14], ecx
mov edi, 8
sub edi, 0x1007f0ec
mov ecx, 0x14
xor edx, edx
sub ecx, 0x1007f0ec
mov dword [esp + 0x10], edi
mov dword [esp + 0x18], ecx
jmp 0x10040284
mov edi, dword [esp + 0x10]
mov ebp, dword [edx + 0x1007f0e8]
mov ebx, dword [esi + 4]
mov dword [edx + ebx], ebp
mov ebp, dword [edx + 0x1007f0ec]
mov ebx, dword [esi + 4]
lea ecx, [edx + 0x1007f0ec]
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 0x10040280
mov ecx, 8
sub ecx, 0x1007f134
mov dword [esp + 0x18], ecx
xor ecx, ecx
jmp 0x10040300
lea edx, [ecx + 0xc]
mov edi, 0x40
jmp 0x10040310
mov ebp, dword [ecx + 0x1007f130]
mov ebx, dword [esi + 8]
mov dword [ecx + ebx], ebp
mov ebp, dword [ecx + 0x1007f134]
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 + 0x1007f138]
mov dword [ebx + ecx + 0x1007f134], ebp
mov ebp, dword [ecx + 0x1007f13c]
mov ebx, dword [esi + 8]
mov dword [edx + ebx], ebp
add ecx, 0x10
add edx, 0x10
sub edi, 1
jne 0x10040310
cmp ecx, 0x1000
jl 0x10040300
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 0x10040378
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 0x10040392
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 0x100403ab
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 0x100403c4
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 0x100403db
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 0x100403f5
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 0x1004040e
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 0x10040427
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 0x1004043e
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 0x10040458
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 0x10040471
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 0x1004048a
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 0x100404a0
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 0x100404ba
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 0x100404d3
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 0x100404ec
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 0x10040503
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 0x1004051d
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 0x10040536
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 0x1004054f
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 0x10040566
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 0x10040580
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 0x10040599
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 0x100405b2
dec edi
or edi, 0xfffffff8
inc edi
add ecx, 0x18
cmp ecx, 0x54
jl 0x10040361
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.1003fab0
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 0x100405d0
xor edi, edi
mov ebx, 0x80
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x10]
push ecx
mov eax, esi
call fcn.1003fab0
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 0x10040605
cmp edi, 0x1000
jl 0x10040600
pop edi
pop ebp
pop ebx
add esp, 0x10
ret